Class SendProxy

java.lang.Object
com.yahoo.messagebus.SendProxy
All Implemented Interfaces:
MessageHandler, ReplyHandler

public class SendProxy extends Object implements MessageHandler, ReplyHandler
This class owns a message that is being sent by message bus. Once a reply is received, the message is attached to it and returned to the application. This also implements the discard policy of RoutingNode.
Author:
Simon Thoresen Hult
  • Constructor Details

    • SendProxy

      public SendProxy(MessageBus mbus, Network net, Resender resender)
      Constructs a new instance of this class to maintain sending of a single message.
      Parameters:
      mbus - The message bus that owns this.
      net - The network layer to transmit through.
      resender - The resender to use.
  • Method Details

    • handleMessage

      public void handleMessage(Message msg)
      Description copied from interface: MessageHandler
      This function is called when a message arrives.
      Specified by:
      handleMessage in interface MessageHandler
      Parameters:
      msg - The message that arrived.
    • handleReply

      public 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.