public class BoltRpcClient extends Object implements RpcClient
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
BOLT_CTX |
static String |
BOLT_REJECTED_EXECUTION_POLICY |
| 构造器和说明 |
|---|
BoltRpcClient(com.alipay.remoting.rpc.RpcClient rpcClient) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkConnection(Endpoint endpoint)
Check connection for given address.
|
boolean |
checkConnection(Endpoint endpoint,
boolean createIfAbsent)
Check connection for given address and async to create a new one if there is no connection.
|
void |
closeConnection(Endpoint endpoint)
Close all connections of a address.
|
com.alipay.remoting.InvokeContext |
getDefaultInvokeCtx() |
com.alipay.remoting.rpc.RpcClient |
getRpcClient() |
boolean |
init(RpcOptions opts)
Initialize the service.
|
void |
invokeAsync(Endpoint endpoint,
Object request,
InvokeContext ctx,
InvokeCallback callback,
long timeoutMs)
Asynchronous invocation with a callback.
|
Object |
invokeSync(Endpoint endpoint,
Object request,
InvokeContext ctx,
long timeoutMs)
Synchronous invocation using a invoke context.
|
void |
registerConnectEventListener(ReplicatorGroup replicatorGroup)
Register a connect event listener for the replicator group.
|
void |
setDefaultInvokeCtx(com.alipay.remoting.InvokeContext defaultInvokeCtx) |
void |
shutdown()
Dispose the resources for service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokeAsync, invokeSyncpublic boolean init(RpcOptions opts)
Lifecycleinit 在接口中 Lifecycle<RpcOptions>public void shutdown()
Lifecycleshutdown 在接口中 Lifecycle<RpcOptions>public boolean checkConnection(Endpoint endpoint)
RpcClientcheckConnection 在接口中 RpcClientendpoint - target addresspublic boolean checkConnection(Endpoint endpoint, boolean createIfAbsent)
RpcClientcheckConnection 在接口中 RpcClientendpoint - target addresscreateIfAbsent - create a new one if there is no connectionpublic void closeConnection(Endpoint endpoint)
RpcClientcloseConnection 在接口中 RpcClientendpoint - target addresspublic void registerConnectEventListener(ReplicatorGroup replicatorGroup)
RpcClientregisterConnectEventListener 在接口中 RpcClientreplicatorGroup - replicator grouppublic Object invokeSync(Endpoint endpoint, Object request, InvokeContext ctx, long timeoutMs) throws InterruptedException, RemotingException
RpcClientinvokeSync 在接口中 RpcClientendpoint - target addressrequest - request objectctx - invoke contexttimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptionpublic void invokeAsync(Endpoint endpoint, Object request, InvokeContext ctx, InvokeCallback callback, long timeoutMs) throws InterruptedException, RemotingException
RpcClientinvokeAsync 在接口中 RpcClientendpoint - target addressrequest - request objectctx - invoke contextcallback - invoke callbacktimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptionpublic com.alipay.remoting.rpc.RpcClient getRpcClient()
public com.alipay.remoting.InvokeContext getDefaultInvokeCtx()
public void setDefaultInvokeCtx(com.alipay.remoting.InvokeContext defaultInvokeCtx)
Copyright © 2021. All rights reserved.