public final class OutgoingRpcAdapterImpl extends Object implements OutgoingRpcAdapter
| Constructor and Description |
|---|
OutgoingRpcAdapterImpl(org.jboss.netty.channel.Channel channel)
Construct a new adapter that will send all its messages
to the parameter channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
returnRpcResult(long rpcIndex,
Rpc.MethodSignature methodSignature,
com.google.protobuf.Message result,
boolean multiReturn)
Send a return value for an invocation.
|
void |
sendCancelMessage(long rpcIndex)
Send a cancel message.
|
void |
sendHeartbeat()
Send a heartbeat message so that the peer at the other
end of the connection knows that we're alive.
|
void |
sendInvocation(String methodName,
String inputType,
String outputType,
Long rpcIndex,
com.google.protobuf.Message rpParameter,
boolean multiReturn,
boolean noReturn)
Send a request to invoke a remote procedure.
|
void |
sendInvocationFailedMessage(long rpcIndex,
String reason)
Sent by the serving side of a connection can inform the client
side that an invocation failed for some reason.
|
void |
terminateMultiReturnSequence(long rpcIndex)
Terminate a sequence of return values.
|
public OutgoingRpcAdapterImpl(org.jboss.netty.channel.Channel channel)
channel - the channel to send all messages to.public void sendInvocation(String methodName, String inputType, String outputType, Long rpcIndex, com.google.protobuf.Message rpParameter, boolean multiReturn, boolean noReturn)
OutgoingRpcAdaptersendInvocation in interface OutgoingRpcAdaptermethodName - The name of the method, this is a fqdn in the
java type namespace.inputType - The name of the input parameter. An fqdn in the java
type namespace.rpcIndex - For this outgoing connection, this is an index
uniquely identifying the invocation.rpParameter - The parameter to the remote procedure.multiReturn - True iff the invocation can return multiple values.noReturn - true iff the invocation is expected to return no value.public void returnRpcResult(long rpcIndex,
Rpc.MethodSignature methodSignature,
com.google.protobuf.Message result,
boolean multiReturn)
OutgoingRpcAdapterreturnRpcResult in interface OutgoingRpcAdapterrpcIndex - The index of this invocation.methodSignature - The signature of the method being invoked.result - The actual result being returned.multiReturn - True iff the invocation can return multiple values, meaning
this return value may not be the last one.public void sendHeartbeat()
OutgoingRpcAdaptersendHeartbeat in interface OutgoingRpcAdapterpublic void sendCancelMessage(long rpcIndex)
OutgoingRpcAdaptersendCancelMessage in interface OutgoingRpcAdapterrpcIndex - Index of the cancelled invocation.public void sendInvocationFailedMessage(long rpcIndex,
String reason)
OutgoingRpcAdaptersendInvocationFailedMessage in interface OutgoingRpcAdapterrpcIndex - The index of the failed invocation.reason - A human readable string explaing what went wrong.public void terminateMultiReturnSequence(long rpcIndex)
OutgoingRpcAdapterterminateMultiReturnSequence in interface OutgoingRpcAdapterrpcIndex - The invocation that is now terminating.Copyright © 2013. All Rights Reserved.