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)
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)
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.
|
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)
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.public void returnRpcResult(long rpcIndex,
Rpc.MethodSignature methodSignature,
com.google.protobuf.Message result)
OutgoingRpcAdapterreturnRpcResult in interface OutgoingRpcAdapterrpcIndex - The index of this invocation.methodSignature - The signature of the method being invoked.result - The actual result being returned.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.Copyright © 2013. All Rights Reserved.