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

    Nested Classes
    Modifier and Type
    Class
    Description
    protected final class 
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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
    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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • buildMethod

      protected abstract com.yahoo.jrt.Method buildMethod()
    • getReturnSpec

      protected abstract String 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

      protected abstract Reply createReply(com.yahoo.jrt.Values ret, String serviceName, Trace trace)
    • toParams

      protected abstract RPCSend.Params toParams(com.yahoo.jrt.Values req)
    • 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 interface RPCSendAdapter
      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 interface com.yahoo.jrt.RequestWaiter
    • invoke

      public final void invoke(com.yahoo.jrt.Request request)
      Specified by:
      invoke in interface com.yahoo.jrt.MethodHandler
    • handleReply

      public final void handleReply(Reply reply)
      Description copied from interface: ReplyHandler
      This function is called when a reply arrives.
      Specified by:
      handleReply in interface ReplyHandler
      Parameters:
      reply - The reply that arrived.