Package org.apache.mina.filter.codec
Interface ProtocolCodecFactory
-
- All Known Implementing Classes:
DemuxingProtocolCodecFactory,LdapProtocolCodecFactory,ObjectSerializationCodecFactory,PrefixedStringCodecFactory,TextLineCodecFactory
public interface ProtocolCodecFactoryProvidesProtocolEncoderandProtocolDecoderwhich translates binary or protocol specific data into message object and vice versa.Please refer to
ReverserProtocolProviderexample.- Author:
- Apache MINA Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProtocolDecodergetDecoder(IoSession session)Returns a new (or reusable) instance ofProtocolDecoderwhich decodes binary or protocol-specific data into message objects.ProtocolEncodergetEncoder(IoSession session)Returns a new (or reusable) instance ofProtocolEncoderwhich encodes message objects into binary or protocol-specific data.
-
-
-
Method Detail
-
getEncoder
ProtocolEncoder getEncoder(IoSession session) throws Exception
Returns a new (or reusable) instance ofProtocolEncoderwhich encodes message objects into binary or protocol-specific data.- Parameters:
session- The current session- Returns:
- The encoder instance
- Throws:
Exception- If an error occurred while retrieving the encoder
-
getDecoder
ProtocolDecoder getDecoder(IoSession session) throws Exception
Returns a new (or reusable) instance ofProtocolDecoderwhich decodes binary or protocol-specific data into message objects.- Parameters:
session- The current session- Returns:
- The decoder instance
- Throws:
Exception- If an error occurred while retrieving the decoder
-
-