com.alibaba.dubbo.rpc
Class RpcInvocation

java.lang.Object
  extended by com.alibaba.dubbo.rpc.RpcInvocation
All Implemented Interfaces:
Invocation, Serializable
Direct Known Subclasses:
DecodeableRpcInvocation

public class RpcInvocation
extends Object
implements Invocation, Serializable

RPC Invocation.

Author:
qian.lei
See Also:
Serialized Form

Constructor Summary
RpcInvocation()
           
RpcInvocation(Invocation invocation)
           
RpcInvocation(Invocation invocation, Invoker<?> invoker)
           
RpcInvocation(Method method, Object[] arguments)
           
RpcInvocation(Method method, Object[] arguments, Map<String,String> attachment)
           
RpcInvocation(String methodName, Class<?>[] parameterTypes, Object[] arguments)
           
RpcInvocation(String methodName, Class<?>[] parameterTypes, Object[] arguments, Map<String,String> attachments)
           
RpcInvocation(String methodName, Class<?>[] parameterTypes, Object[] arguments, Map<String,String> attachments, Invoker<?> invoker)
           
 
Method Summary
 void addAttachments(Map<String,String> attachments)
           
 void addAttachmentsIfAbsent(Map<String,String> attachments)
           
 Object[] getArguments()
          get arguments.
 String getAttachment(String key)
          get attachment by key.
 String getAttachment(String key, String defaultValue)
          get attachment by key with default value.
 Map<String,String> getAttachments()
          get attachments.
 Invoker<?> getInvoker()
          get the invoker in current context.
 String getMethodName()
          get method name.
 Class<?>[] getParameterTypes()
          get parameter types.
 void setArguments(Object[] arguments)
           
 void setAttachment(String key, String value)
           
 void setAttachmentIfAbsent(String key, String value)
           
 void setAttachments(Map<String,String> attachments)
           
 void setInvoker(Invoker<?> invoker)
           
 void setMethodName(String methodName)
           
 void setParameterTypes(Class<?>[] parameterTypes)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RpcInvocation

public RpcInvocation()

RpcInvocation

public RpcInvocation(Invocation invocation,
                     Invoker<?> invoker)

RpcInvocation

public RpcInvocation(Invocation invocation)

RpcInvocation

public RpcInvocation(Method method,
                     Object[] arguments)

RpcInvocation

public RpcInvocation(Method method,
                     Object[] arguments,
                     Map<String,String> attachment)

RpcInvocation

public RpcInvocation(String methodName,
                     Class<?>[] parameterTypes,
                     Object[] arguments)

RpcInvocation

public RpcInvocation(String methodName,
                     Class<?>[] parameterTypes,
                     Object[] arguments,
                     Map<String,String> attachments)

RpcInvocation

public RpcInvocation(String methodName,
                     Class<?>[] parameterTypes,
                     Object[] arguments,
                     Map<String,String> attachments,
                     Invoker<?> invoker)
Method Detail

getInvoker

public Invoker<?> getInvoker()
Description copied from interface: Invocation
get the invoker in current context.

Specified by:
getInvoker in interface Invocation
Returns:
invoker.

setInvoker

public void setInvoker(Invoker<?> invoker)

getMethodName

public String getMethodName()
Description copied from interface: Invocation
get method name.

Specified by:
getMethodName in interface Invocation
Returns:
method name.

setMethodName

public void setMethodName(String methodName)

getParameterTypes

public Class<?>[] getParameterTypes()
Description copied from interface: Invocation
get parameter types.

Specified by:
getParameterTypes in interface Invocation
Returns:
parameter types.

setParameterTypes

public void setParameterTypes(Class<?>[] parameterTypes)

getArguments

public Object[] getArguments()
Description copied from interface: Invocation
get arguments.

Specified by:
getArguments in interface Invocation
Returns:
arguments.

setArguments

public void setArguments(Object[] arguments)

getAttachments

public Map<String,String> getAttachments()
Description copied from interface: Invocation
get attachments.

Specified by:
getAttachments in interface Invocation
Returns:
attachments.

setAttachments

public void setAttachments(Map<String,String> attachments)

setAttachment

public void setAttachment(String key,
                          String value)

setAttachmentIfAbsent

public void setAttachmentIfAbsent(String key,
                                  String value)

addAttachments

public void addAttachments(Map<String,String> attachments)

addAttachmentsIfAbsent

public void addAttachmentsIfAbsent(Map<String,String> attachments)

getAttachment

public String getAttachment(String key)
Description copied from interface: Invocation
get attachment by key.

Specified by:
getAttachment in interface Invocation
Returns:
attachment value.

getAttachment

public String getAttachment(String key,
                            String defaultValue)
Description copied from interface: Invocation
get attachment by key with default value.

Specified by:
getAttachment in interface Invocation
Returns:
attachment value.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012–2017 Alibaba. All rights reserved.