Class PushEvent.DataEvent<T>

java.lang.Object
org.osgi.util.pushstream.PushEvent<T>
org.osgi.util.pushstream.PushEvent.DataEvent<T>
Enclosing class:
PushEvent<T>

static final class PushEvent.DataEvent<T> extends PushEvent<T>
  • Field Details

    • data

      private final T data
  • Constructor Details

    • DataEvent

      DataEvent(T data)
  • Method Details

    • getData

      public T getData()
      Description copied from class: PushEvent
      Return the data for this event.
      Overrides:
      getData in class PushEvent<T>
      Returns:
      The data payload.
    • getType

      public PushEvent.EventType getType()
      Description copied from class: PushEvent
      Get the type of this event.
      Specified by:
      getType in class PushEvent<T>
      Returns:
      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 class PushEvent<T>
      Returns:
      false if this is a data event, otherwise true.
    • 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.
      Overrides:
      nodata in class PushEvent<T>
      Type Parameters:
      X - The new payload type.
      Returns:
      The current error or close event mapped to a new payload type.