com.alibaba.dubbo.remoting.exchange.codec
Class ExchangeCodec
java.lang.Object
com.alibaba.dubbo.remoting.transport.AbstractCodec
com.alibaba.dubbo.remoting.transport.codec.TransportCodec
com.alibaba.dubbo.remoting.telnet.codec.TelnetCodec
com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec
- All Implemented Interfaces:
- Codec
- Direct Known Subclasses:
- DubboCodec
public class ExchangeCodec
- extends TelnetCodec
ExchangeCodec.
- Author:
- qianlei, william.liangf
ExchangeCodec
public ExchangeCodec()
getMagicCode
public Short getMagicCode()
encode
public void encode(Channel channel,
OutputStream os,
Object msg)
throws IOException
- Description copied from interface:
Codec
- Encode message.
- Specified by:
encode in interface Codec- Overrides:
encode in class TelnetCodec
- Parameters:
channel - channel.os - output stream.msg - message.
- Throws:
IOException
decode
public Object decode(Channel channel,
InputStream is)
throws IOException
- Description copied from interface:
Codec
- Decode message.
- Specified by:
decode in interface Codec- Overrides:
decode in class TelnetCodec
- Parameters:
channel - channel.is - input stream.
- Returns:
- message or
NEED_MORE_INPUT poison.
- Throws:
IOException- See Also:
Codec.NEED_MORE_INPUT
Copyright © 2012 Alibaba. All Rights Reserved.