Package org.osgi.util.pushstream
Class PushEvent.DataEvent<T>
- java.lang.Object
-
- org.osgi.util.pushstream.PushEvent<T>
-
- org.osgi.util.pushstream.PushEvent.DataEvent<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.osgi.util.pushstream.PushEvent
PushEvent.CloseEvent<T>, PushEvent.DataEvent<T>, PushEvent.ErrorEvent<T>, PushEvent.EventType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetData()Return the data for this event.PushEvent.EventTypegetType()Get the type of this event.booleanisTerminal()Answer if no more events will follow after this event.<X> PushEvent<X>nodata()Convenience to cast a close/error event to another payload type.-
Methods inherited from class org.osgi.util.pushstream.PushEvent
close, data, error, getFailure
-
-
-
-
Field Detail
-
data
private final T data
-
-
Constructor Detail
-
DataEvent
DataEvent(T data)
-
-
Method Detail
-
getType
public PushEvent.EventType getType()
Description copied from class:PushEventGet the type of this event.
-
isTerminal
public boolean isTerminal()
Description copied from class:PushEventAnswer if no more events will follow after this event.- Overrides:
isTerminalin classPushEvent<T>- Returns:
falseif this is a data event, otherwisetrue.
-
nodata
public <X> PushEvent<X> nodata()
Description copied from class:PushEventConvenience 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.
-
-