public abstract class AbstractHttpContentHolder<T> extends java.lang.Object implements HttpContentHolder<T>
HttpContentHolder
Modifier and Type | Field and Description |
---|---|
protected UnicastContentSubject<T> |
content |
Modifier | Constructor and Description |
---|---|
protected |
AbstractHttpContentHolder(UnicastContentSubject<T> content) |
Modifier and Type | Method and Description |
---|---|
rx.Observable<T> |
getContent()
Returns the content
Observable . |
void |
ignoreContent()
This will ignore the content and any attempt to subscribe to the content
Observable as returned by
HttpContentHolder.getContent() will result in invoking Observer.onError(Throwable) on the subscriber. |
protected final UnicastContentSubject<T> content
protected AbstractHttpContentHolder(UnicastContentSubject<T> content)
public rx.Observable<T> getContent()
HttpContentHolder
Observable
. The content Observable
can have one and only one subscription. Observable.publish()
Observable
or else it will increase
memory consumption as the underlying Observable
buffers content untill subscription.
HttpContentHolder.ignoreContent()
or else the content will remain in memory till the configured timeout.getContent
in interface HttpContentHolder<T>
Observable
which must have one and only one subscription.UnicastContentSubject
public void ignoreContent()
HttpContentHolder
Observable
as returned by
HttpContentHolder.getContent()
will result in invoking Observer.onError(Throwable)
on the subscriber.ignoreContent
in interface HttpContentHolder<T>