public interface ProtocolCodecFactory
ProtocolEncoder
and ProtocolDecoder
which translates
binary or protocol specific data into message object and vice versa.
Please refer to
ReverserProtocolProvider
example.
限定符和类型 | 方法和说明 |
---|---|
ProtocolDecoder |
getDecoder(IoSession session)
Returns a new (or reusable) instance of
ProtocolDecoder which
decodes binary or protocol-specific data into message objects. |
ProtocolEncoder |
getEncoder(IoSession session)
Returns a new (or reusable) instance of
ProtocolEncoder which
encodes message objects into binary or protocol-specific data. |
ProtocolEncoder getEncoder(IoSession session) throws java.lang.Exception
ProtocolEncoder
which
encodes message objects into binary or protocol-specific data.session
- The current sessionjava.lang.Exception
- If an error occurred while retrieving the encoderProtocolDecoder getDecoder(IoSession session) throws java.lang.Exception
ProtocolDecoder
which
decodes binary or protocol-specific data into message objects.session
- The current sessionjava.lang.Exception
- If an error occurred while retrieving the decoder