com.alibaba.dubbo.rpc.protocol.dubbo
Class DecodeableRpcResult

java.lang.Object
  extended by com.alibaba.dubbo.rpc.RpcResult
      extended by com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult
All Implemented Interfaces:
Codec, Decodeable, Result, Serializable

public class DecodeableRpcResult
extends RpcResult
implements Codec, Decodeable

Author:
kimi
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.alibaba.dubbo.remoting.Codec
NEED_MORE_INPUT
 
Constructor Summary
DecodeableRpcResult(Channel channel, Response response, InputStream is, Invocation invocation, byte id)
           
 
Method Summary
 void decode()
           
 Object decode(Channel channel, InputStream input)
          Decode message.
 void encode(Channel channel, OutputStream output, Object message)
          Encode message.
 
Methods inherited from class com.alibaba.dubbo.rpc.RpcResult
getAttachment, getAttachment, getAttachments, getException, getResult, getValue, hasException, recreate, setAttachment, setAttachments, setException, setResult, setValue, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecodeableRpcResult

public DecodeableRpcResult(Channel channel,
                           Response response,
                           InputStream is,
                           Invocation invocation,
                           byte id)
Method Detail

encode

public void encode(Channel channel,
                   OutputStream output,
                   Object message)
            throws IOException
Description copied from interface: Codec
Encode message.

Specified by:
encode in interface Codec
Parameters:
channel - channel.
output - output stream.
message - message.
Throws:
IOException

decode

public Object decode(Channel channel,
                     InputStream input)
              throws IOException
Description copied from interface: Codec
Decode message.

Specified by:
decode in interface Codec
Parameters:
channel - channel.
input - input stream.
Returns:
message or NEED_MORE_INPUT poison.
Throws:
IOException
See Also:
Codec.NEED_MORE_INPUT

decode

public void decode()
            throws Exception
Specified by:
decode in interface Decodeable
Throws:
Exception


Copyright © 2012–2017 Alibaba. All rights reserved.