Class LegacyEmitterImpl<T>

  • Type Parameters:
    T - the type of payload or message
    All Implemented Interfaces:
    Emitter<T>

    public class LegacyEmitterImpl<T>
    extends Object
    implements Emitter<T>
    Implementation of the old (legacy) Emitter interface. This implementation delegates to the new implementation.
    • Method Detail

      • complete

        public void complete()
        Description copied from interface: Emitter
        Completes the stream. This method sends the completion signal, no messages can be sent once this method is called.
        Specified by:
        complete in interface Emitter<T>
      • error

        public void error​(Exception e)
        Description copied from interface: Emitter
        Propagates an error in the stream. This methods sends an error signal, no messages can be sent once this method is called.
        Specified by:
        error in interface Emitter<T>
        Parameters:
        e - the exception, must not be null
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface Emitter<T>
        Returns:
        true if the emitter has been terminated or the subscription cancelled.
      • send

        public Emitter<T> send​(T msg)
        Description copied from interface: Emitter
        Sends a payload or a message to the stream.
        Specified by:
        send in interface Emitter<T>
        Parameters:
        msg - the thing to send, must not be null
        Returns:
        the current emitter