public class ImageCodecFactory extends Object implements ProtocolCodecFactory
ProtocolCodecFactory
for the tutorial on how to write a protocol codecConstructor and Description |
---|
ImageCodecFactory(boolean client) |
Modifier and Type | Method and Description |
---|---|
ProtocolDecoder |
getDecoder(IoSession ioSession)
Returns a new (or reusable) instance of
ProtocolDecoder which
decodes binary or protocol-specific data into message objects. |
ProtocolEncoder |
getEncoder(IoSession ioSession)
Returns a new (or reusable) instance of
ProtocolEncoder which
encodes message objects into binary or protocol-specific data. |
public ImageCodecFactory(boolean client)
public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception
ProtocolCodecFactory
ProtocolEncoder
which
encodes message objects into binary or protocol-specific data.getEncoder
in interface ProtocolCodecFactory
ioSession
- The current sessionException
- If an error occurred while retrieving the encoderpublic ProtocolDecoder getDecoder(IoSession ioSession) throws Exception
ProtocolCodecFactory
ProtocolDecoder
which
decodes binary or protocol-specific data into message objects.getDecoder
in interface ProtocolCodecFactory
ioSession
- The current sessionException
- If an error occurred while retrieving the decoderCopyright © 2004–2016 Apache MINA Project. All rights reserved.