Package com.yahoo.messagebus.network.rpc
Class RPCSend
java.lang.Object
com.yahoo.messagebus.network.rpc.RPCSend
- All Implemented Interfaces:
com.yahoo.jrt.MethodHandler
,com.yahoo.jrt.RequestWaiter
,RPCSendAdapter
,ReplyHandler
- Direct Known Subclasses:
RPCSendV2
public abstract class RPCSend
extends Object
implements com.yahoo.jrt.MethodHandler, ReplyHandler, com.yahoo.jrt.RequestWaiter, RPCSendAdapter
Implements the request adapter for method "mbus.send1/mbus.slime".
- Author:
- baldersheim
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.yahoo.jrt.Method
protected abstract Reply
createReply
(com.yahoo.jrt.Values ret, String serviceName, Trace trace) protected abstract void
createResponse
(com.yahoo.jrt.Values ret, Reply reply, com.yahoo.component.Version version, byte[] payload) protected final Object
decode
(com.yahoo.text.Utf8Array protocolName, com.yahoo.component.Version version, byte[] payload) protected abstract com.yahoo.jrt.Request
encodeRequest
(com.yahoo.component.Version version, Route route, RPCServiceAddress address, Message msg, long timeRemaining, byte[] payload, int traceLevel) protected abstract String
final void
handleReply
(Reply reply) This function is called when a reply arrives.final void
handleRequestDone
(com.yahoo.jrt.Request req) final void
invoke
(com.yahoo.jrt.Request request) final void
send
(RoutingNode recipient, com.yahoo.component.Version version, byte[] payload, long timeRemaining) Performs the actual sending to the given recipient.protected abstract RPCSend.Params
toParams
(com.yahoo.jrt.Values req)
-
Constructor Details
-
RPCSend
-
-
Method Details
-
buildMethod
protected abstract com.yahoo.jrt.Method buildMethod() -
getReturnSpec
-
encodeRequest
protected abstract com.yahoo.jrt.Request encodeRequest(com.yahoo.component.Version version, Route route, RPCServiceAddress address, Message msg, long timeRemaining, byte[] payload, int traceLevel) -
createReply
-
toParams
-
createResponse
protected abstract void createResponse(com.yahoo.jrt.Values ret, Reply reply, com.yahoo.component.Version version, byte[] payload) -
send
public final void send(RoutingNode recipient, com.yahoo.component.Version version, byte[] payload, long timeRemaining) Description copied from interface:RPCSendAdapter
Performs the actual sending to the given recipient.- Specified by:
send
in interfaceRPCSendAdapter
- Parameters:
recipient
- The recipient to send to.version
- The version for which the payload is serialized.payload
- The already serialized payload of the message to send.timeRemaining
- The time remaining until the message expires.
-
decode
protected final Object decode(com.yahoo.text.Utf8Array protocolName, com.yahoo.component.Version version, byte[] payload) -
handleRequestDone
public final void handleRequestDone(com.yahoo.jrt.Request req) - Specified by:
handleRequestDone
in interfacecom.yahoo.jrt.RequestWaiter
-
invoke
public final void invoke(com.yahoo.jrt.Request request) - Specified by:
invoke
in interfacecom.yahoo.jrt.MethodHandler
-
handleReply
Description copied from interface:ReplyHandler
This function is called when a reply arrives.- Specified by:
handleReply
in interfaceReplyHandler
- Parameters:
reply
- The reply that arrived.
-