Class PushEvent.DataEvent<T>

    • Field Detail

      • data

        private final T data
    • Constructor Detail

      • DataEvent

        DataEvent​(T data)
    • Method Detail

      • 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.
      • 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.