public class RpcServiceContext extends RpcContext
RpcContext.RestoreContext, RpcContext.RestoreServiceContext| 限定符和类型 | 方法和说明 |
|---|---|
<T> CompletableFuture<T> |
asyncCall(Callable<T> callable)
Async invocation.
|
void |
asyncCall(Runnable runnable)
one way async call, send request only, and result is not required
|
RpcServiceContext |
copyOf(boolean needCopy)
Only part of the properties are copied, the others are either not used currently or can be got from invocation.
|
Object[] |
getArguments()
get arguments.
|
<T> CompletableFuture<T> |
getCompletableFuture()
get CompletableFuture.
|
URL |
getConsumerUrl() |
<T> Future<T> |
getFuture()
get future.
|
String |
getGroup() |
String |
getInterfaceName() |
Invocation |
getInvocation()
已过时。
Replace to getMethodName(), getParameterTypes(), getArguments()
|
Invoker<?> |
getInvoker()
已过时。
Replace to getUrl()
|
List<Invoker<?>> |
getInvokers()
已过时。
Replace to getUrls()
|
InetSocketAddress |
getLocalAddress()
get local address.
|
String |
getLocalAddressString() |
String |
getLocalHost()
get local host.
|
String |
getLocalHostName()
get local host name.
|
Boolean |
getLocalInvoke() |
int |
getLocalPort()
get local port.
|
String |
getMethodName()
get method name.
|
Class<?>[] |
getParameterTypes()
get parameter types.
|
String |
getProtocol() |
String |
getProtocolServiceKey() |
InetSocketAddress |
getRemoteAddress()
get remote address.
|
String |
getRemoteAddressString()
get remote address string.
|
String |
getRemoteApplicationName() |
String |
getRemoteHost()
get remote host.
|
String |
getRemoteHostName()
get remote host name.
|
int |
getRemotePort()
get remote port.
|
Object |
getRequest()
Get the request object of the underlying RPC protocol, e.g.
|
<T> T |
getRequest(Class<T> clazz)
Get the request object of the underlying RPC protocol, e.g.
|
Object |
getResponse()
Get the response object of the underlying RPC protocol, e.g.
|
<T> T |
getResponse(Class<T> clazz)
Get the response object of the underlying RPC protocol, e.g.
|
String |
getServiceKey() |
URL |
getUrl() |
List<URL> |
getUrls() |
String |
getVersion() |
boolean |
isClientSide()
已过时。
Replace to isConsumerSide()
|
boolean |
isConsumerSide()
is consumer side.
|
boolean |
isNeedPrintRouterSnapshot() |
boolean |
isProviderSide()
is provider side.
|
boolean |
isServerSide()
已过时。
Replace to isProviderSide()
|
void |
setArguments(Object[] arguments) |
void |
setConsumerUrl(URL consumerUrl) |
void |
setFuture(CompletableFuture<?> future)
set future.
|
RpcServiceContext |
setInvocation(Invocation invocation) |
RpcServiceContext |
setInvoker(Invoker<?> invoker) |
RpcServiceContext |
setInvokers(List<Invoker<?>> invokers) |
RpcServiceContext |
setLocalAddress(InetSocketAddress address)
set local address.
|
RpcServiceContext |
setLocalAddress(String host,
int port)
set local address.
|
RpcServiceContext |
setLocalInvoke(boolean localInvoke) |
void |
setMethodName(String methodName) |
void |
setNeedPrintRouterSnapshot(boolean needPrintRouterSnapshot) |
void |
setParameterTypes(Class<?>[] parameterTypes) |
RpcServiceContext |
setRemoteAddress(InetSocketAddress address)
set remote address.
|
RpcServiceContext |
setRemoteAddress(String host,
int port)
set remote address.
|
RpcServiceContext |
setRemoteApplicationName(String remoteApplicationName) |
void |
setRequest(Object request) |
void |
setResponse(Object response) |
void |
setUrl(URL url) |
void |
setUrls(List<URL> urls) |
canRemove, clearAfterEachInvoke, clearAttachments, get, get, getAsyncContext, getAttachment, getAttachments, getCancellationContext, getClientAttachment, getClientResponseContext, getContext, getCurrentServiceContext, getObjectAttachment, getObjectAttachments, getServerAttachment, getServerContext, getServerResponseContext, getServiceContext, isAsyncStarted, remove, removeAttachment, removeCancellationContext, removeClientAttachment, removeClientResponseContext, removeContext, removeServerAttachment, removeServerContext, removeServerResponseContext, removeServiceContext, restoreCancellationContext, restoreServiceContext, set, setAttachment, setAttachment, setAttachments, setObjectAttachment, setObjectAttachments, setRpcContext, startAsync, stopAsync, storeServiceContextpublic Object getRequest()
getRequest 在类中 RpcContextpublic void setRequest(Object request)
setRequest 在类中 RpcContextpublic <T> T getRequest(Class<T> clazz)
getRequest 在类中 RpcContextpublic Object getResponse()
getResponse 在类中 RpcContextpublic void setResponse(Object response)
setResponse 在类中 RpcContextpublic <T> T getResponse(Class<T> clazz)
getResponse 在类中 RpcContextpublic boolean isProviderSide()
isProviderSide 在类中 RpcContextpublic boolean isConsumerSide()
isConsumerSide 在类中 RpcContextpublic <T> CompletableFuture<T> getCompletableFuture()
getCompletableFuture 在类中 RpcContextT - public <T> Future<T> getFuture()
getFuture 在类中 RpcContextT - public void setFuture(CompletableFuture<?> future)
setFuture 在类中 RpcContextfuture - public List<URL> getUrls()
getUrls 在类中 RpcContextpublic void setUrls(List<URL> urls)
setUrls 在类中 RpcContextpublic URL getUrl()
getUrl 在类中 RpcContextpublic void setUrl(URL url)
setUrl 在类中 RpcContextpublic String getMethodName()
getMethodName 在类中 RpcContextpublic void setMethodName(String methodName)
setMethodName 在类中 RpcContextpublic Class<?>[] getParameterTypes()
getParameterTypes 在类中 RpcContextpublic void setParameterTypes(Class<?>[] parameterTypes)
setParameterTypes 在类中 RpcContextpublic Object[] getArguments()
getArguments 在类中 RpcContextpublic void setArguments(Object[] arguments)
setArguments 在类中 RpcContextpublic RpcServiceContext setLocalAddress(String host, int port)
setLocalAddress 在类中 RpcContexthost - port - public InetSocketAddress getLocalAddress()
getLocalAddress 在类中 RpcContextpublic RpcServiceContext setLocalAddress(InetSocketAddress address)
setLocalAddress 在类中 RpcContextaddress - public String getLocalAddressString()
getLocalAddressString 在类中 RpcContextpublic String getLocalHostName()
getLocalHostName 在类中 RpcContextpublic RpcServiceContext setRemoteAddress(String host, int port)
setRemoteAddress 在类中 RpcContexthost - port - public InetSocketAddress getRemoteAddress()
getRemoteAddress 在类中 RpcContextpublic RpcServiceContext setRemoteAddress(InetSocketAddress address)
setRemoteAddress 在类中 RpcContextaddress - public String getRemoteApplicationName()
getRemoteApplicationName 在类中 RpcContextpublic RpcServiceContext setRemoteApplicationName(String remoteApplicationName)
setRemoteApplicationName 在类中 RpcContextpublic String getRemoteAddressString()
getRemoteAddressString 在类中 RpcContextpublic String getRemoteHostName()
getRemoteHostName 在类中 RpcContextpublic String getLocalHost()
getLocalHost 在类中 RpcContextpublic int getLocalPort()
getLocalPort 在类中 RpcContextpublic String getRemoteHost()
getRemoteHost 在类中 RpcContextpublic int getRemotePort()
getRemotePort 在类中 RpcContext@Deprecated public boolean isServerSide()
isServerSide 在类中 RpcContext@Deprecated public boolean isClientSide()
isClientSide 在类中 RpcContext@Deprecated public List<Invoker<?>> getInvokers()
getInvokers 在类中 RpcContextpublic RpcServiceContext setInvokers(List<Invoker<?>> invokers)
setInvokers 在类中 RpcContext@Deprecated public Invoker<?> getInvoker()
getInvoker 在类中 RpcContextpublic RpcServiceContext setInvoker(Invoker<?> invoker)
setInvoker 在类中 RpcContext@Deprecated public Invocation getInvocation()
getInvocation 在类中 RpcContextpublic RpcServiceContext setInvocation(Invocation invocation)
setInvocation 在类中 RpcContextpublic <T> CompletableFuture<T> asyncCall(Callable<T> callable)
Future.get() is not called.asyncCall 在类中 RpcContextcallable - future.get()public void asyncCall(Runnable runnable)
asyncCall 在类中 RpcContextrunnable - public String getGroup()
getGroup 在类中 RpcContextpublic String getVersion()
getVersion 在类中 RpcContextpublic String getInterfaceName()
getInterfaceName 在类中 RpcContextpublic String getProtocol()
getProtocol 在类中 RpcContextpublic String getServiceKey()
getServiceKey 在类中 RpcContextpublic String getProtocolServiceKey()
getProtocolServiceKey 在类中 RpcContextpublic URL getConsumerUrl()
getConsumerUrl 在类中 RpcContextpublic void setConsumerUrl(URL consumerUrl)
setConsumerUrl 在类中 RpcContextpublic boolean isNeedPrintRouterSnapshot()
public void setNeedPrintRouterSnapshot(boolean needPrintRouterSnapshot)
public RpcServiceContext setLocalInvoke(boolean localInvoke)
public Boolean getLocalInvoke()
public RpcServiceContext copyOf(boolean needCopy)
RpcContextAttachment.copyOf(boolean)needCopy - Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.