Class BroadcastHandler

    • Constructor Detail

      • BroadcastHandler

        public BroadcastHandler()
    • Method Detail

      • addHandler

        public void addHandler​(CommandHandler handler)
        Add a new child handler
        Parameters:
        handler - - the listening handler
      • onEmit

        public void onEmit​(Command command)
        Description copied from interface: CommandHandler
        Allows this handler to process the Command that was just written into the stream to which this handler was attached.
        Specified by:
        onEmit in interface CommandHandler
        Parameters:
        command - the received command
      • onError

        public void onError​(String errorMessage)
        Description copied from interface: CommandHandler
        Allows this handler to process error states.
        Specified by:
        onError in interface CommandHandler
        Parameters:
        errorMessage - the error's message
      • onDone

        public void onDone()
        Description copied from interface: CommandHandler
        This method is called when the stream has been closed. The contract is that after this call, no other commands or errors will be emitted.
        Specified by:
        onDone in interface CommandHandler