Interface EngineHandlerContext

  • All Known Implementing Classes:
    ProtonEngineHandlerContext

    public interface EngineHandlerContext
    Context provided to EngineHandler events to allow further event propagation
    • Method Detail

      • engine

        Engine engine()
        Returns:
        the Engine where this handler is registered.
      • fireEngineStarting

        void fireEngineStarting()
        Fires the engine starting event into the next handler in the EnginePipeline chain.
      • fireEngineStateChanged

        void fireEngineStateChanged()
        Fires the engine state changed event into the next handler in the EnginePipeline chain. The state change events occur after the engine starting event and generally signify that the engine has been shutdown normally.
      • fireFailed

        void fireFailed​(EngineFailedException failure)
        Fires the Engine failed event into the next handler in the EnginePipeline chain.
        Parameters:
        failure - The exception that describes the conditions under which the engine failed.
      • fireRead

        void fireRead​(ProtonBuffer buffer)
        Fires a read of ProtonBuffer events into the previous handler in the EnginePipeline for further processing.
        Parameters:
        buffer - The ProtonBuffer that carries the bytes read.
      • fireRead

        void fireRead​(HeaderEnvelope header)
        Fires a read of HeaderFrame events into the previous handler in the EnginePipeline for further processing.
        Parameters:
        header - The HeaderEnvelope that carries the header bytes read.
      • fireRead

        void fireRead​(SASLEnvelope envelope)
        Fires a read of SASL events into the previous handler in the EnginePipeline for further processing.
        Parameters:
        envelope - The SASLEnvelope that carries the SASL performative read.
      • fireWrite

        void fireWrite​(HeaderEnvelope envelope)
        Fires a write of HeaderFrame events into the next handler in the EnginePipeline for further processing.
        Parameters:
        envelope - The HeaderEnvelope that carries the AMQP Header being written.
      • fireWrite

        void fireWrite​(ProtonBuffer buffer,
                       Runnable ioComplete)
        Fires a write of ProtonBuffer events into the next handler in the EnginePipeline for further processing.
        Parameters:
        buffer - The ProtonBuffer that carries the bytes being written.
        ioComplete - An optional Runnable callback that is signaled when the I/O completes successfully.