Package org.apache.dubbo.rpc
Class RpcInvocation
java.lang.Object
org.apache.dubbo.rpc.RpcInvocation
- All Implemented Interfaces:
Serializable,Invocation
RPC Invocation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.only for testRpcInvocation(Method method, String interfaceName, String protocolServiceKey, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(Method method, String interfaceName, String protocolServiceKey, Object[] arguments, Map<String, Object> attachment, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(String targetServiceUniqueName, ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes, InvokeMode invokeMode) To create a brand-new invocationRpcInvocation(Invocation invocation) Deep clone of an invocationRpcInvocation(Invocation invocation, Invoker<?> invoker) Deep clone of an invocation invalid input: '&' put some service params into attachment from invoker (will not change the invoker in invocation)RpcInvocation(ServiceModel serviceModel, Method method, String interfaceName, String protocolServiceKey, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(ServiceModel serviceModel, Method method, String interfaceName, String protocolServiceKey, Object[] arguments, Map<String, Object> attachment, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments) To create a brand-new invocationRpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.xRpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes, InvokeMode invokeMode) Deprecated.deprecated, will be removed in 3.1.x -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachments(Map<String, String> attachments) Deprecated.voidaddAttachmentsIfAbsent(Map<String, String> attachments) Deprecated.voidaddInvokedInvoker(Invoker<?> invoker) To add invoked invokers into invocation.voidaddObjectAttachments(Map<String, Object> attachments) voidaddObjectAttachmentsIfAbsent(Map<String, Object> attachments) voidforeachAttachment(Consumer<Map.Entry<String, Object>> consumer) Object[]get arguments.getAttachment(String key) Deprecated.getAttachment(String key, String defaultValue) Deprecated.Deprecated.String[]get parameter's signature, string representation of parameter types.Get all invoked invokers in current invocation.Invoker<?> get the invoker in current context.get method name.getObjectAttachment(String key, Object defaultValue) Deprecated.Class<?>[]get parameter types.Class<?> Type[]get the interface namevoidsetArguments(Object[] arguments) voidsetAttachment(String key, Object value) voidsetAttachment(String key, String value) voidsetAttachmentIfAbsent(String key, Object value) voidsetAttachmentIfAbsent(String key, String value) voidsetAttachments(Map<String, String> attachments) Deprecated.voidsetCompatibleParamSignatures(String[] compatibleParamSignatures) voidsetInvokeMode(InvokeMode invokeMode) voidsetInvoker(Invoker<?> invoker) voidsetMethodName(String methodName) voidsetObjectAttachment(String key, Object value) voidsetObjectAttachmentIfAbsent(String key, Object value) voidsetObjectAttachments(Map<String, Object> attachments) voidsetParameterTypes(Class<?>[] parameterTypes) voidsetParameterTypesDesc(String parameterTypesDesc) voidsetReturnType(Class<?> returnType) voidsetReturnTypes(Type[] returnTypes) voidsetServiceModel(ServiceModel serviceModel) voidsetServiceName(String interfaceName) voidsetTargetServiceUniqueName(String targetServiceUniqueName) toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.dubbo.rpc.Invocation
getModuleModel
-
Constructor Details
-
RpcInvocation
Deprecated.only for test -
RpcInvocation
Deep clone of an invocation- Parameters:
invocation- original invocation
-
RpcInvocation
Deep clone of an invocation invalid input: '&' put some service params into attachment from invoker (will not change the invoker in invocation)- Parameters:
invocation- original invocationinvoker- target invoker
-
RpcInvocation
public RpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments) To create a brand-new invocation -
RpcInvocation
@Deprecated public RpcInvocation(ServiceModel serviceModel, Method method, String interfaceName, String protocolServiceKey, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(Method method, String interfaceName, String protocolServiceKey, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(ServiceModel serviceModel, Method method, String interfaceName, String protocolServiceKey, Object[] arguments, Map<String, Object> attachment, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(Method method, String interfaceName, String protocolServiceKey, Object[] arguments, Map<String, Object> attachment, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
@Deprecated public RpcInvocation(ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes, InvokeMode invokeMode) Deprecated.deprecated, will be removed in 3.1.x -
RpcInvocation
public RpcInvocation(String targetServiceUniqueName, ServiceModel serviceModel, String methodName, String interfaceName, String protocolServiceKey, Class<?>[] parameterTypes, Object[] arguments, Map<String, Object> attachments, Invoker<?> invoker, Map<Object, Object> attributes, InvokeMode invokeMode) To create a brand-new invocation
-
-
Method Details
-
getInvoker
Description copied from interface:Invocationget the invoker in current context.- Specified by:
getInvokerin interfaceInvocation- Returns:
- invoker.
-
setInvoker
-
remove
-
put
- Specified by:
putin interfaceInvocation
-
get
- Specified by:
getin interfaceInvocation
-
getAttributes
- Specified by:
getAttributesin interfaceInvocation
-
addInvokedInvoker
Description copied from interface:InvocationTo add invoked invokers into invocation. Can be used in ClusterFilter or Filter for tracing or debugging purpose. Currently, only support in consumer side.- Specified by:
addInvokedInvokerin interfaceInvocation- Parameters:
invoker- invoked invokers
-
getInvokedInvokers
Description copied from interface:InvocationGet all invoked invokers in current invocation. NOTICE: A curtain invoker could be invoked for twice or more if retries.- Specified by:
getInvokedInvokersin interfaceInvocation- Returns:
- invokers
-
getTargetServiceUniqueName
- Specified by:
getTargetServiceUniqueNamein interfaceInvocation
-
setTargetServiceUniqueName
-
getProtocolServiceKey
- Specified by:
getProtocolServiceKeyin interfaceInvocation
-
getMethodName
Description copied from interface:Invocationget method name.- Specified by:
getMethodNamein interfaceInvocation- Returns:
- method name.
-
setMethodName
-
getServiceName
Description copied from interface:Invocationget the interface name- Specified by:
getServiceNamein interfaceInvocation- Returns:
-
setServiceName
-
getParameterTypes
Description copied from interface:Invocationget parameter types.- Specified by:
getParameterTypesin interfaceInvocation- Returns:
- parameter types.
-
setParameterTypes
-
getParameterTypesDesc
-
setParameterTypesDesc
-
getCompatibleParamSignatures
Description copied from interface:Invocationget parameter's signature, string representation of parameter types.- Specified by:
getCompatibleParamSignaturesin interfaceInvocation- Returns:
- parameter's signature
-
setCompatibleParamSignatures
-
getArguments
Description copied from interface:Invocationget arguments.- Specified by:
getArgumentsin interfaceInvocation- Returns:
- arguments.
-
setArguments
-
getObjectAttachments
- Specified by:
getObjectAttachmentsin interfaceInvocation
-
copyObjectAttachments
- Specified by:
copyObjectAttachmentsin interfaceInvocation
-
foreachAttachment
- Specified by:
foreachAttachmentin interfaceInvocation
-
setObjectAttachments
-
setAttachment
- Specified by:
setAttachmentin interfaceInvocation
-
getAttachments
Deprecated.Description copied from interface:Invocationget attachments.- Specified by:
getAttachmentsin interfaceInvocation- Returns:
- attachments.
-
setAttachments
Deprecated. -
setAttachment
- Specified by:
setAttachmentin interfaceInvocation
-
setObjectAttachment
- Specified by:
setObjectAttachmentin interfaceInvocation
-
setAttachmentIfAbsent
- Specified by:
setAttachmentIfAbsentin interfaceInvocation
-
setAttachmentIfAbsent
- Specified by:
setAttachmentIfAbsentin interfaceInvocation
-
setObjectAttachmentIfAbsent
- Specified by:
setObjectAttachmentIfAbsentin interfaceInvocation
-
addAttachments
Deprecated. -
addObjectAttachments
-
addAttachmentsIfAbsent
Deprecated. -
addObjectAttachmentsIfAbsent
-
getAttachment
Deprecated.Description copied from interface:Invocationget attachment by key.- Specified by:
getAttachmentin interfaceInvocation- Returns:
- attachment value.
-
getObjectAttachment
- Specified by:
getObjectAttachmentin interfaceInvocation
-
getAttachment
Deprecated.Description copied from interface:Invocationget attachment by key with default value.- Specified by:
getAttachmentin interfaceInvocation- Returns:
- attachment value.
-
getObjectAttachment
Deprecated.- Specified by:
getObjectAttachmentin interfaceInvocation
-
getObjectAttachmentWithoutConvert
- Specified by:
getObjectAttachmentWithoutConvertin interfaceInvocation
-
getReturnType
-
setReturnType
-
getReturnTypes
-
setReturnTypes
-
getInvokeMode
-
setInvokeMode
-
setServiceModel
- Specified by:
setServiceModelin interfaceInvocation
-
getServiceModel
- Specified by:
getServiceModelin interfaceInvocation
-
toString
-