Interface ProtocolEncoder

    • Method Detail

      • encode

        void encode​(IoSession session,
                    java.lang.Object message,
                    ProtocolEncoderOutput out)
             throws java.lang.Exception
        Encodes higher-level message objects into binary or protocol-specific data. MINA invokes encode(IoSession, Object, ProtocolEncoderOutput) method with message which is popped from the session write queue, and then the encoder implementation puts encoded messages (typically IoBuffers) into ProtocolEncoderOutput.
        Parameters:
        session - The current Session
        message - the message to encode
        out - The ProtocolEncoderOutput that will receive the encoded message
        Throws:
        java.lang.Exception - if the message violated protocol specification
      • dispose

        void dispose​(IoSession session)
              throws java.lang.Exception
        Releases all resources related with this encoder.
        Parameters:
        session - The current Session
        Throws:
        java.lang.Exception - if failed to dispose all resources