Package org.apache.dubbo.rpc
Class RpcContextAttachment
java.lang.Object
org.apache.dubbo.rpc.RpcContext
org.apache.dubbo.rpc.RpcContextAttachment
- Direct Known Subclasses:
RpcServerContextAttachment
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.dubbo.rpc.RpcContext
RpcContext.RestoreContext, RpcContext.RestoreServiceContext -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyOf(boolean needCopy) Also seeRpcServiceContext.copyOf(boolean)get()Deprecated.Deprecated.getAttachment(String key) also seegetObjectAttachment(String).Deprecated.get attachment.get attachments.booleanDeprecated.removeAttachment(String key) remove attachment.Deprecated.setAttachment(String key, Object value) setAttachment(String key, String value) set attachment.setAttachments(Map<String, String> attachment) set attachmentssetObjectAttachment(String key, Object value) setObjectAttachments(Map<String, Object> attachment) set attachmentsstatic AsyncContextbooleanMethods inherited from class org.apache.dubbo.rpc.RpcContext
asyncCall, asyncCall, canRemove, clearAfterEachInvoke, getArguments, getCancellationContext, getClientAttachment, getClientResponseContext, getCompletableFuture, getConsumerUrl, getContext, getCurrentServiceContext, getFuture, getGroup, getInterfaceName, getInvocation, getInvoker, getInvokers, getLocalAddress, getLocalAddressString, getLocalHost, getLocalHostName, getLocalPort, getMethodName, getParameterTypes, getProtocol, getProtocolServiceKey, getRemoteAddress, getRemoteAddressString, getRemoteApplicationName, getRemoteHost, getRemoteHostName, getRemotePort, getRequest, getRequest, getResponse, getResponse, getServerAttachment, getServerContext, getServerResponseContext, getServiceContext, getServiceKey, getUrl, getUrls, getVersion, isClientSide, isConsumerSide, isProviderSide, isServerSide, removeCancellationContext, removeClientAttachment, removeClientResponseContext, removeContext, removeServerAttachment, removeServerContext, removeServerResponseContext, removeServiceContext, restoreCancellationContext, restoreServiceContext, setArguments, setConsumerUrl, setFuture, setInvocation, setInvoker, setInvokers, setLocalAddress, setLocalAddress, setMethodName, setParameterTypes, setRemoteAddress, setRemoteAddress, setRemoteApplicationName, setRequest, setResponse, setRpcContext, setUrl, setUrls, storeServiceContext
-
Method Details
-
startAsync
- Returns:
- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()- Overrides:
isAsyncStartedin classRpcContext
-
stopAsync
public boolean stopAsync()- Overrides:
stopAsyncin classRpcContext
-
getAsyncContext
- Overrides:
getAsyncContextin classRpcContext
-
getAttachment
also seegetObjectAttachment(String).- Overrides:
getAttachmentin classRpcContext- Parameters:
key-- Returns:
- attachment
-
getObjectAttachment
get attachment.- Overrides:
getObjectAttachmentin classRpcContext- Parameters:
key-- Returns:
- attachment
-
setAttachment
set attachment.- Overrides:
setAttachmentin classRpcContext- Parameters:
key-value-- Returns:
- context
-
setAttachment
- Overrides:
setAttachmentin classRpcContext
-
setObjectAttachment
- Overrides:
setObjectAttachmentin classRpcContext
-
removeAttachment
remove attachment.- Overrides:
removeAttachmentin classRpcContext- Parameters:
key-- Returns:
- context
-
getAttachments
Deprecated.get attachments.- Overrides:
getAttachmentsin classRpcContext- Returns:
- attachments
-
getObjectAttachments
get attachments.- Overrides:
getObjectAttachmentsin classRpcContext- Returns:
- attachments
-
setAttachments
set attachments- Overrides:
setAttachmentsin classRpcContext- Parameters:
attachment-- Returns:
- context
-
setObjectAttachments
set attachments- Overrides:
setObjectAttachmentsin classRpcContext- Parameters:
attachment-- Returns:
- context
-
clearAttachments
public void clearAttachments()- Overrides:
clearAttachmentsin classRpcContext
-
get
Deprecated.get values.- Overrides:
getin classRpcContext- Returns:
- values
-
set
Deprecated.set value.- Overrides:
setin classRpcContext- Parameters:
key-value-- Returns:
- context
-
remove
Deprecated.remove value.- Overrides:
removein classRpcContext- Parameters:
key-- Returns:
- value
-
get
Deprecated.get value.- Overrides:
getin classRpcContext- Parameters:
key-- Returns:
- value
-
copyOf
Also seeRpcServiceContext.copyOf(boolean)- Returns:
- a copy of RpcContextAttachment with deep copied attachments
-