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 T
getData()
Return the data for this event.PushEvent.EventType
getType()
Get the type of this event.boolean
isTerminal()
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:PushEvent
Get the type of this event.
-
isTerminal
public boolean isTerminal()
Description copied from class:PushEvent
Answer if no more events will follow after this event.- Overrides:
isTerminal
in classPushEvent<T>
- Returns:
false
if this is a data event, otherwisetrue
.
-
nodata
public <X> PushEvent<X> nodata()
Description copied from class: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.
-
-