public class ImageCodecFactory extends java.lang.Object implements ProtocolCodecFactory
ProtocolCodecFactory
for the tutorial on how to write a protocol codec构造器和说明 |
---|
ImageCodecFactory(boolean client) |
限定符和类型 | 方法和说明 |
---|---|
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 ProtocolEncoder getEncoder(IoSession ioSession) throws java.lang.Exception
ProtocolCodecFactory
ProtocolEncoder
which
encodes message objects into binary or protocol-specific data.getEncoder
在接口中 ProtocolCodecFactory
ioSession
- The current sessionjava.lang.Exception
- If an error occurred while retrieving the encoderpublic ProtocolDecoder getDecoder(IoSession ioSession) throws java.lang.Exception
ProtocolCodecFactory
ProtocolDecoder
which
decodes binary or protocol-specific data into message objects.getDecoder
在接口中 ProtocolCodecFactory
ioSession
- The current sessionjava.lang.Exception
- If an error occurred while retrieving the decoder