public interface ClientService extends Lifecycle<RpcOptions>
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkConnection(Endpoint endpoint,
boolean createIfAbsent)
Check connection for given address and async to create a new one if there is no connection.
|
boolean |
connect(Endpoint endpoint)
Connect to endpoint, returns true when success.
|
boolean |
disconnect(Endpoint endpoint)
Disconnect from endpoint.
|
<T extends com.google.protobuf.Message> |
invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
RpcResponseClosure<T> done,
int timeoutMs)
Send a requests and waits for response with callback, returns the request future.
|
boolean |
isConnected(Endpoint endpoint)
Returns true when the endpoint's connection is active.
|
boolean connect(Endpoint endpoint)
endpoint - server addressboolean checkConnection(Endpoint endpoint, boolean createIfAbsent)
endpoint - target addresscreateIfAbsent - create a new one if there is no connectionboolean disconnect(Endpoint endpoint)
endpoint - server addressboolean isConnected(Endpoint endpoint)
endpoint - server address<T extends com.google.protobuf.Message> Future<com.google.protobuf.Message> invokeWithDone(Endpoint endpoint, com.google.protobuf.Message request, RpcResponseClosure<T> done, int timeoutMs)
endpoint - server addressrequest - request datadone - callbacktimeoutMs - timeout millisCopyright © 2021. All rights reserved.