private static enum AbstractListenerWriteProcessor.State extends java.lang.Enum<AbstractListenerWriteProcessor.State>
Subscriber
to be in. The following figure
indicate the four different states that exist, and the relationships between them.
UNSUBSCRIBED | v REQUESTED -------------------> RECEIVED ^ ^ | | --------- WRITING <----- | v COMPLETEDRefer to the individual states for more information.
Enum Constant and Description |
---|
COMPLETED
The terminal completed state.
|
RECEIVED
State that gets entered after a data has been
received.
|
REQUESTED
State that gets entered after a data has been
requested.
|
UNSUBSCRIBED
The initial unsubscribed state.
|
WRITING
State that gets entered after a writing of the current data has been
onWritePossible started . |
Modifier and Type | Method and Description |
---|---|
<T> void |
onComplete(AbstractListenerWriteProcessor<T> processor) |
<T> void |
onError(AbstractListenerWriteProcessor<T> processor,
java.lang.Throwable ex) |
<T> void |
onNext(AbstractListenerWriteProcessor<T> processor,
T data) |
<T> void |
onSubscribe(AbstractListenerWriteProcessor<T> processor,
Subscription subscription) |
<T> void |
onWritePossible(AbstractListenerWriteProcessor<T> processor) |
static AbstractListenerWriteProcessor.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AbstractListenerWriteProcessor.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AbstractListenerWriteProcessor.State UNSUBSCRIBED
onSubscribe
by
requesting 1 data from the subscription, and change state to REQUESTED
.public static final AbstractListenerWriteProcessor.State REQUESTED
public static final AbstractListenerWriteProcessor.State RECEIVED
onWritePossible
by writing the current data and changes
the state to WRITING
. If it can be written completely,
changes the state to either REQUESTED
if the subscription
has not been completed; or COMPLETED
if it has. If it cannot
be written completely the state will be changed to #RECEIVED
.public static final AbstractListenerWriteProcessor.State WRITING
onWritePossible started
.public static final AbstractListenerWriteProcessor.State COMPLETED
public static AbstractListenerWriteProcessor.State[] values()
for (AbstractListenerWriteProcessor.State c : AbstractListenerWriteProcessor.State.values()) System.out.println(c);
public static AbstractListenerWriteProcessor.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic <T> void onSubscribe(AbstractListenerWriteProcessor<T> processor, Subscription subscription)
public <T> void onNext(AbstractListenerWriteProcessor<T> processor, T data)
public <T> void onError(AbstractListenerWriteProcessor<T> processor, java.lang.Throwable ex)
public <T> void onComplete(AbstractListenerWriteProcessor<T> processor)
public <T> void onWritePossible(AbstractListenerWriteProcessor<T> processor)