EventType#DATA – Provides access to a typed data element in the
stream.
EventType#CLOSE – The stream is closed. After receiving this
event, no more events will follow.
EventType#ERROR – The stream ran into an unrecoverable problem
and is sending the reason downstream. The stream is closed and no more events
will follow after this event.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class | |
| public static enum | PushEvent.
The type of a |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static < The payload type. T> PushEvent | |
| public static < The payload type. T> PushEvent | Returns: A new data event wrapping the specified payload.The payload. payload)Create a new data event. |
| public static < The payload type. T> PushEvent | |
| public T | |
| public Throwable | Returns: The error that terminated the stream.Return the error that terminated the stream. |
| public abstract PushEvent. | |
| public boolean | Returns: false if this is a data event, otherwise true.Answer if no more events will follow after this event. |
| public < The new payload type. X> PushEvent | Returns: The current error or close event mapped to a new payload type.Convenience to cast a close/error event to another payload type. |
| PushEvent | back to summary |
|---|---|
| pack-priv PushEvent() Package private default constructor. | |
| close | back to summary |
|---|---|
| public static <T> PushEvent Create a new close event.
| |
| data | back to summary |
|---|---|
| public static <T> PushEvent Create a new data event.
| |
| error | back to summary |
|---|---|
| public static <T> PushEvent Create a new error event. | |
| getData | back to summary |
|---|---|
| public T getData() Return the data for this event.
| |
| getFailure | back to summary |
|---|---|
| public Throwable getFailure() Return the error that terminated the stream.
| |
| getType | back to summary |
|---|---|
| public abstract PushEvent. Get the type of this event. | |
| isTerminal | back to summary |
|---|---|
| public boolean isTerminal() Answer if no more events will follow after this event.
| |
| nodata | back to summary |
|---|---|
| public <X> PushEvent Convenience to cast a close/error event to another payload type. Since the payload type is not needed for these events this is harmless. This therefore allows you to forward the close/error event downstream without creating anew event.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public PushEvent. | getType()
Implements abstract org. Get the type of this event. |
| CloseEvent | back to summary |
|---|---|
| pack-priv CloseEvent() | |
| getType | back to summary |
|---|---|
| public PushEvent. Implements abstract org. Doc from org. Get the type of this event. | |
| Modifier and Type | Field and Description |
|---|---|
| private final T |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public PushEvent. | getType()
Implements abstract org. Get the type of this event. |
| public boolean | isTerminal()
Overrides org. Answer if no more events will follow after this event. |
| public <X> PushEvent | nodata()
Overrides org. Convenience to cast a close/error event to another payload type. |
| data | back to summary |
|---|---|
| private final T data | |
| DataEvent | back to summary |
|---|---|
| pack-priv DataEvent(T data) | |
| getData | back to summary |
|---|---|
| public T getData() Overrides org. Doc from org. Return the data for this event.
| |
| getType | back to summary |
|---|---|
| public PushEvent. Implements abstract org. Doc from org. Get the type of this event. | |
| isTerminal | back to summary |
|---|---|
| public boolean isTerminal() Overrides org. Doc from org. Answer if no more events will follow after this event.
| |
| nodata | back to summary |
|---|---|
| public <X> PushEvent Overrides org. Doc from org. Convenience to cast a close/error event to another payload type. Since the payload type is not needed for these events this is harmless. This therefore allows you to forward the close/error event downstream without creating anew event. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Throwable | getFailure()
Overrides org. Return the error that terminated the stream. |
| public PushEvent. | getType()
Implements abstract org. Get the type of this event. |
| error | back to summary |
|---|---|
| private final Throwable error | |
| ErrorEvent | back to summary |
|---|---|
| pack-priv ErrorEvent(Throwable error) | |
| getFailure | back to summary |
|---|---|
| public Throwable getFailure() Overrides org. Doc from org. Return the error that terminated the stream. | |
| getType | back to summary |
|---|---|
| public PushEvent. Implements abstract org. Doc from org. Get the type of this event. | |
PushEvent.
| Modifier and Type | Field and Description |
|---|---|
| public static final PushEvent. | CLOSE
An event that indicates that the stream has terminated normally |
| public static final PushEvent. | DATA
A data event forming part of the stream |
| public static final PushEvent. | ERROR
An error event that indicates streaming has failed and that no more events will arrive |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PushEvent. | |
| public static PushEvent. |
| CLOSE | back to summary |
|---|---|
| public static final PushEvent. An event that indicates that the stream has terminated normally | |
| DATA | back to summary |
|---|---|
| public static final PushEvent. A data event forming part of the stream | |
| ERROR | back to summary |
|---|---|
| public static final PushEvent. An error event that indicates streaming has failed and that no more events will arrive | |
| EventType | back to summary |
|---|---|
| private EventType() | |
| valueOf | back to summary |
|---|---|
| public static PushEvent. | |
| values | back to summary |
|---|---|
| public static PushEvent. | |