Wraps a Content. as a Flow..
When content is requested via Flow., it is
read from the passed Content. and passed to Flow..
If no content is available, then the Content. method is used to
ultimately call Flow. once content is available.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | subscribe(Flow.
the subscriber subscriberImplements java. Adds the given Subscriber if possible. |
| content | back to summary |
|---|---|
| private final Content. | |
| ContentSourcePublisher | back to summary |
|---|---|
| public ContentSourcePublisher(Content. | |
| subscribe | back to summary |
|---|---|
| public void subscribe(Flow. Implements java. Doc from java. Adds the given Subscriber if possible. If already
subscribed, or the attempt to subscribe fails due to policy
violations or errors, the Subscriber's
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final Content. | |
| private long | |
| private final AutoLock | |
| private boolean | |
| private final Flow. | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements java. Causes the Subscriber to (eventually) stop receiving messages. |
| private void | |
| public void | request(long
the increment of demand; a value of n)Long.MAX_VALUE may be considered as effectively unboundedImplements java. Adds the given number |
| private void |
| cancelled | back to summary |
|---|---|
| private boolean cancelled | |
| content | back to summary |
|---|---|
| private final Content. | |
| demand | back to summary |
|---|---|
| private long demand | |
| lock | back to summary |
|---|---|
| private final AutoLock lock | |
| stalled | back to summary |
|---|---|
| private boolean stalled | |
| subscriber | back to summary |
|---|---|
| private final Flow. | |
| terminated | back to summary |
|---|---|
| private boolean terminated | |
| SubscriptionImpl | back to summary |
|---|---|
| public SubscriptionImpl(Content. | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements java. Doc from java. Causes the Subscriber to (eventually) stop receiving
messages. Implementation is best-effort -- additional
messages may be received after invoking this method.
A cancelled subscription need not ever receive an
| |
| process | back to summary |
|---|---|
| private void process() | |
| request | back to summary |
|---|---|
| public void request(long n) Implements java. Doc from java. Adds the given number
| |
| terminate | back to summary |
|---|---|
| private void terminate() | |