Package org.apache.dubbo.rpc
Interface Invocation
- All Known Implementing Classes:
RpcInvocation
public interface Invocation
Invocation. (API, Prototype, NonThreadSafe)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInvokedInvoker(Invoker<?> invoker) To add invoked invokers into invocation.voidforeachAttachment(Consumer<Map.Entry<String, Object>> consumer) Object[]get arguments.getAttachment(String key) get attachment by key.getAttachment(String key, String defaultValue) get attachment by key with default value.get attachments.default 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.default ModuleModelgetObjectAttachment(String key, Object defaultValue) default ObjectClass<?>[]get parameter types.get the interface namevoidsetAttachment(String key, Object value) voidsetAttachment(String key, String value) voidsetAttachmentIfAbsent(String key, Object value) voidsetAttachmentIfAbsent(String key, String value) voidsetObjectAttachment(String key, Object value) voidsetObjectAttachmentIfAbsent(String key, Object value) voidsetServiceModel(ServiceModel serviceModel)
-
Method Details
-
getTargetServiceUniqueName
String getTargetServiceUniqueName() -
getProtocolServiceKey
String getProtocolServiceKey() -
getMethodName
String getMethodName()get method name.- Returns:
- method name.
-
getServiceName
String getServiceName()get the interface name- Returns:
-
getParameterTypes
Class<?>[] getParameterTypes()get parameter types.- Returns:
- parameter types.
-
getCompatibleParamSignatures
get parameter's signature, string representation of parameter types.- Returns:
- parameter's signature
-
getArguments
Object[] getArguments()get arguments.- Returns:
- arguments.
-
getAttachments
get attachments.- Returns:
- attachments.
-
getObjectAttachments
-
copyObjectAttachments
-
foreachAttachment
-
setAttachment
-
setAttachment
-
setObjectAttachment
-
setAttachmentIfAbsent
-
setAttachmentIfAbsent
-
setObjectAttachmentIfAbsent
-
getAttachment
get attachment by key.- Returns:
- attachment value.
-
getObjectAttachment
-
getObjectAttachmentWithoutConvert
-
getAttachment
get attachment by key with default value.- Returns:
- attachment value.
-
getObjectAttachment
-
getInvoker
Invoker<?> getInvoker()get the invoker in current context.- Returns:
- invoker.
-
setServiceModel
-
getServiceModel
ServiceModel getServiceModel() -
getModuleModel
-
put
-
get
-
getAttributes
-
addInvokedInvoker
To add invoked invokers into invocation. Can be used in ClusterFilter or Filter for tracing or debugging purpose. Currently, only support in consumer side.- Parameters:
invoker- invoked invokers
-
getInvokedInvokers
Get all invoked invokers in current invocation. NOTICE: A curtain invoker could be invoked for twice or more if retries.- Returns:
- invokers
-