| 程序包 | 说明 |
|---|---|
| com.alipay.sofa.rpc.context |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static ThreadLocal<RpcInvokeContext> |
RpcInvokeContext.LOCAL
线程上下文变量
|
| 限定符和类型 | 方法和说明 |
|---|---|
static RpcInvokeContext |
RpcInvokeContext.getContext()
得到上下文,没有则初始化
|
static RpcInvokeContext |
RpcInvokeContext.peekContext()
查看上下文
|
RpcInvokeContext |
RpcInvokeContext.setFuture(ResponseFuture<?> future)
设置单次请求返回的异步Future对象
|
RpcInvokeContext |
RpcInvokeContext.setResponseCallback(SofaResponseCallback responseCallback)
设置单次请求的指定回调方法
|
RpcInvokeContext |
RpcInvokeContext.setTargetGroup(String targetGroup)
设置单次请求的指定分组
|
RpcInvokeContext |
RpcInvokeContext.setTargetURL(String targetURL)
设置单次请求的指定地址
|
RpcInvokeContext |
RpcInvokeContext.setTimeout(Integer timeout)
设置调用级别超时时间
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
BaggageResolver.carryWithRequest(RpcInvokeContext context,
SofaRequest request)
通过请求透传数据
|
static void |
BaggageResolver.carryWithResponse(RpcInvokeContext context,
SofaResponse response)
通过响应透传数据
|
static void |
BaggageResolver.pickupFromRequest(RpcInvokeContext context,
SofaRequest request)
从请求里获取透传数据
|
static void |
BaggageResolver.pickupFromRequest(RpcInvokeContext context,
SofaRequest request,
boolean init)
从请求里获取透传数据
|
static void |
BaggageResolver.pickupFromResponse(RpcInvokeContext context,
SofaResponse response)
从响应里获取透传数据
|
static void |
BaggageResolver.pickupFromResponse(RpcInvokeContext context,
SofaResponse response,
boolean init)
从响应里获取透传数据
|
static void |
RpcInvokeContext.setContext(RpcInvokeContext context)
设置上下文
|
Copyright © 2008–2018 The Ant Financial. All rights reserved.