public class RpcContext extends Object
| 限定符 | 构造器和说明 |
|---|---|
protected |
RpcContext() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearAttachments() |
Map<String,Object> |
get()
get values.
|
Object |
get(String key)
get value.
|
Object[] |
getArguments()
get arguments.
|
String |
getAttachment(String key)
get attachment.
|
Map<String,String> |
getAttachments()
get attachments.
|
static RpcContext |
getContext()
get context.
|
<T> Future<T> |
getFuture()
get future.
|
InetSocketAddress |
getLocalAddress()
get local address.
|
String |
getMethodName()
get method name.
|
Class<?>[] |
getParameterTypes()
get parameter types.
|
InetSocketAddress |
getRemoteAddress()
get remote address.
|
boolean |
isConsumerSide()
is consumer side.
|
boolean |
isProviderSide()
is provider side.
|
RpcContext |
remove(String key)
remove value.
|
RpcContext |
removeAttachment(String key)
remove attachment.
|
static void |
removeContext()
remove context.
|
RpcContext |
set(String key,
Object value)
set value.
|
void |
setArguments(Object[] arguments) |
RpcContext |
setAttachment(String key,
String value)
set attachment.
|
RpcContext |
setAttachments(Map<String,String> attachment)
set attachments
|
void |
setFuture(Future<?> future)
set future.
|
RpcContext |
setLocalAddress(InetSocketAddress address)
set local address.
|
RpcContext |
setLocalAddress(String host,
int port)
set local address.
|
void |
setMethodName(String methodName) |
void |
setParameterTypes(Class<?>[] parameterTypes) |
RpcContext |
setProviderSide(boolean isProvider) |
RpcContext |
setRemoteAddress(InetSocketAddress address)
set remote address.
|
RpcContext |
setRemoteAddress(String host,
int port)
set remote address.
|
public static RpcContext getContext()
public static void removeContext()
public boolean isProviderSide()
public RpcContext setProviderSide(boolean isProvider)
public boolean isConsumerSide()
public <T> Future<T> getFuture()
T - public void setFuture(Future<?> future)
future - public String getMethodName()
public void setMethodName(String methodName)
public Class<?>[] getParameterTypes()
public void setParameterTypes(Class<?>[] parameterTypes)
public Object[] getArguments()
public void setArguments(Object[] arguments)
public RpcContext setLocalAddress(InetSocketAddress address)
address - public RpcContext setLocalAddress(String host, int port)
host - port - public InetSocketAddress getLocalAddress()
public RpcContext setRemoteAddress(InetSocketAddress address)
address - public RpcContext setRemoteAddress(String host, int port)
host - port - public InetSocketAddress getRemoteAddress()
public RpcContext setAttachment(String key, String value)
key - value - public RpcContext removeAttachment(String key)
key - public RpcContext setAttachments(Map<String,String> attachment)
attachment - public void clearAttachments()
public RpcContext set(String key, Object value)
key - value - public RpcContext remove(String key)
key - Copyright © 2018. All rights reserved.