Class SendProxy

  • All Implemented Interfaces:
    MessageHandler, ReplyHandler

    public class SendProxy
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      SendProxy​(MessageBus mbus, Network net, Resender resender)
      Constructs a new instance of this class to maintain sending of a single message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handleMessage​(Message msg)
      This function is called when a message arrives.
      void handleReply​(Reply reply)
      This function is called when a reply arrives.
      • Methods inherited from class java.lang.Object

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

      • 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 Detail

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