com.alibaba.dubbo.remoting.exchange.codec
Class ExchangeCodec

java.lang.Object
  extended by com.alibaba.dubbo.remoting.transport.AbstractCodec
      extended by com.alibaba.dubbo.remoting.transport.codec.TransportCodec
          extended by com.alibaba.dubbo.remoting.telnet.codec.TelnetCodec
              extended by 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

Field Summary
 
Fields inherited from interface com.alibaba.dubbo.remoting.Codec
NEED_MORE_INPUT
 
Constructor Summary
ExchangeCodec()
           
 
Method Summary
 Object decode(Channel channel, InputStream is)
          Decode message.
 void encode(Channel channel, OutputStream os, Object msg)
          Encode message.
 Short getMagicCode()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeCodec

public ExchangeCodec()
Method Detail

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.