Interface ProtocolEncoder

All Known Implementing Classes:
DemuxingProtocolEncoder, HttpClientEncoder, HttpServerEncoder, ObjectSerializationEncoder, PrefixedStringEncoder, ProtocolEncoderAdapter, SynchronizedProtocolEncoder, TextLineEncoder

public interface ProtocolEncoder
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 by calling ProtocolEncoderOutput.write(Object).

Please refer to TextLineEncoder example.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    dispose(IoSession session)
    Releases all resources related with this encoder.
    void
    encode(IoSession session, Object message, ProtocolEncoderOutput out)
    Encodes higher-level message objects into binary or protocol-specific data.