org.apache.mina.filter.codec

Interface ProtocolCodecFactory

Known Implementing Classes:
DemuxingProtocolCodecFactory, ObjectSerializationCodecFactory, TextLineCodecFactory

public interface ProtocolCodecFactory

Provides ProtocolEncoder and ProtocolDecoder which translates binary or protocol specific data into message object and vice versa.

Please refer to ReverserProtocolProvider example.

Method Summary

ProtocolDecoder
getDecoder()
Returns a new (or reusable) instance of ProtocolDecoder which decodes binary or protocol-specific data into message objects.
ProtocolEncoder
getEncoder()
Returns a new (or reusable) instance of ProtocolEncoder which encodes message objects into binary or protocol-specific data.

Method Details

getDecoder

public ProtocolDecoder getDecoder()
            throws Exception
Returns a new (or reusable) instance of ProtocolDecoder which decodes binary or protocol-specific data into message objects.

getEncoder

public ProtocolEncoder getEncoder()
            throws Exception
Returns a new (or reusable) instance of ProtocolEncoder which encodes message objects into binary or protocol-specific data.