| Modifier and Type | Field and Description |
|---|---|
static int |
MAXIMUM_TCP_PORT_NUMBER |
| Constructor and Description |
|---|
RpcClientImpl(int capacity) |
RpcClientImpl(int capacity,
MethodSignatureResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
RpcClient |
addInterface(Class serviceDefinition)
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.
|
void |
setChannel(org.jboss.netty.channel.Channel channel) |
RpcClient |
start()
Start the client.
|
void |
start(org.jboss.netty.channel.Channel channel,
ChannelShutdownCleaner channelCleanupRunnable) |
void |
stop()
Stop the client from accepting incoming invocations.
|
void |
terminateMultiSequence(long rpcIndex)
Terminate the sequence of return values associated with
the index.
|
public static final int MAXIMUM_TCP_PORT_NUMBER
public RpcClientImpl(int capacity)
public RpcClientImpl(int capacity,
MethodSignatureResolver resolver)
public void returnCall(RemoteExecutionContext dc, com.google.protobuf.Message message)
RpcClientreturnCall in interface RpcClientdc - The context for this invocation.message - The value to return.public void terminateMultiSequence(long rpcIndex)
RpcClientterminateMultiSequence in interface RpcClientrpcIndex - The index we're ending the return sequence for.public void setChannel(org.jboss.netty.channel.Channel channel)
public void start(org.jboss.netty.channel.Channel channel,
ChannelShutdownCleaner channelCleanupRunnable)
public com.google.protobuf.RpcChannel newClientRpcChannel()
RpcClientnewClientRpcChannel in interface RpcClientpublic BlobeeRpcController newController()
RpcClientnewController in interface RpcClientpublic void failInvocation(long rpcIndex,
String errorMessage)
RpcClientfailInvocation in interface RpcClientrpcIndex - The index of the invocation to fail.errorMessage - A human readable error message.public void cancelInvocation(long rpcIndex)
RpcClientcancelInvocation in interface RpcClientrpcIndex - Index of the invocation to cancel.public RpcClient start()
RpcClientpublic RpcClient addInvocationListener(RpcClientSideInvocationListener listener)
RpcClientaddInvocationListener in interface RpcClientlistener - a listenerpublic MethodSignatureResolver getResolver()
RpcClientgetResolver in interface RpcClientpublic RpcClient addProtobuferRpcInterface(Object instance)
addProtobuferRpcInterface in interface RpcClientpublic RpcClient addInterface(Class serviceDefinition)
RpcClientaddInterface in interface RpcClientserviceDefinition - A protoc generated service interface.Copyright © 2013. All Rights Reserved.