org.apache.mina.filter.codec.demux |
Protocol codecs that helps you to implement even more complex protocols by
splitting a codec into multiple sub-codecs.
|
Java Source File Name | Type | Comment |
DemuxingProtocolCodecFactory.java | Class | A convenience
ProtocolCodecFactory that provides
DemuxingProtocolEncoder and
DemuxingProtocolDecoder as a pair. |
DemuxingProtocolDecoder.java | Class | A composite
ProtocolDecoder that demultiplexes incoming
IoBuffer decoding requests into an appropriate
MessageDecoder .
Internal mechanism of
MessageDecoder selection
-
DemuxingProtocolDecoder iterates the list of candidate
MessageDecoder s and calls
MessageDecoder.decodable(IoSessionIoBuffer) .
Initially, all registered
MessageDecoder s are candidates.
- If
MessageDecoderResult.NOT_OK is returned, it is removed from the candidate
list.
- If
MessageDecoderResult.NEED_DATA is returned, it is retained in the candidate
list, and its
MessageDecoder.decodable(IoSessionIoBuffer) will be invoked
again when more data is received.
- If
MessageDecoderResult.OK is returned,
DemuxingProtocolDecoder found the right
MessageDecoder .
- If there's no candidate left, an exception is raised.
|
DemuxingProtocolEncoder.java | Class | A composite
ProtocolEncoder that demultiplexes incoming message
encoding requests into an appropriate
MessageEncoder .
Disposing resources acquired by
MessageEncoder
Override
DemuxingProtocolEncoder.dispose(IoSession) method. |
MessageDecoder.java | Interface | Decodes a certain type of messages. |
MessageDecoderAdapter.java | Class | An abstract
MessageDecoder implementation for those who don't need to
implement
MessageDecoder.finishDecode(IoSessionProtocolDecoderOutput) method. |
MessageDecoderFactory.java | Interface | A factory that creates a new instance of
MessageDecoder . |
MessageDecoderResult.java | Class | Represents results from
MessageDecoder . |
MessageEncoder.java | Interface | Encodes a certain type of messages. |
MessageEncoderFactory.java | Interface | A factory that creates a new instance of
MessageEncoder . |