| Constructor and Description |
|---|
ConnectingRpcClientImpl(org.jboss.netty.bootstrap.ClientBootstrap clientBootstrap,
InetSocketAddress socketAddress)
Create a client that will connect to a remote service.
|
| Modifier and Type | Method and Description |
|---|---|
RpcClient |
addInterface(Class serviceInterface)
Let the client handle requests for a service interface.
|
RpcClient |
addInvocationListener(RpcClientSideInvocationListener listener)
Used for debugging and testing.
|
RpcClient |
addProtobuferRpcInterface(Object instance) |
void |
cancelInvocation(long rpcIndex)
Cancel invocation.
|
void |
failInvocation(long rpcIndex,
String errorMessage)
Signal that an invocation has failed.
|
MethodSignatureResolver |
getResolver()
Get the resolver instance used by this client to map
methods to parameter/return value prototypes.
|
com.google.protobuf.RpcChannel |
newClientRpcChannel()
Generate a new client channel to be used for communicating
through this RpcClient.
|
BlobeeRpcController |
newController()
Get a new controller associated with this client.
|
void |
returnCall(RemoteExecutionContext dc,
com.google.protobuf.Message message)
Return the value of an invocation.
|
RpcClient |
start()
Start the client.
|
void |
stop()
Stop the client from accepting incoming invocations.
|
void |
terminateMultiSequence(long rpcIdx)
Terminate the sequence of return values associated with
the index.
|
public ConnectingRpcClientImpl(org.jboss.netty.bootstrap.ClientBootstrap clientBootstrap,
InetSocketAddress socketAddress)
clientBootstrap - A ClientBootstrap used by the client to connect.socketAddress - The socket to connect to.public RpcClient start()
RpcClientpublic void cancelInvocation(long rpcIndex)
RpcClientcancelInvocation in interface RpcClientrpcIndex - Index of the invocation to cancel.public void failInvocation(long rpcIndex,
String errorMessage)
RpcClientfailInvocation in interface RpcClientrpcIndex - The index of the invocation to fail.errorMessage - A human readable error message.public com.google.protobuf.RpcChannel newClientRpcChannel()
RpcClientnewClientRpcChannel in interface RpcClientpublic BlobeeRpcController newController()
RpcClientnewController in interface RpcClientpublic void returnCall(RemoteExecutionContext dc, com.google.protobuf.Message message)
RpcClientreturnCall in interface RpcClientdc - The context for this invocation.message - The value to return.public MethodSignatureResolver getResolver()
RpcClientgetResolver in interface RpcClientpublic RpcClient addProtobuferRpcInterface(Object instance)
addProtobuferRpcInterface in interface RpcClientpublic RpcClient addInterface(Class serviceInterface)
RpcClientaddInterface in interface RpcClientserviceInterface - A protoc generated service interface.public RpcClient addInvocationListener(RpcClientSideInvocationListener listener)
RpcClientaddInvocationListener in interface RpcClientlistener - a listenerpublic void stop()
RpcClientpublic void terminateMultiSequence(long rpcIdx)
RpcClientterminateMultiSequence in interface RpcClientrpcIdx - The index we're ending the return sequence for.Copyright © 2013. All Rights Reserved.