Package com.yahoo.messagebus
Class SendProxy
- java.lang.Object
-
- com.yahoo.messagebus.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 ofRoutingNode
.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description SendProxy(MessageBus mbus, com.yahoo.messagebus.network.Network net, com.yahoo.messagebus.routing.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.
-
-
-
Constructor Detail
-
SendProxy
public SendProxy(MessageBus mbus, com.yahoo.messagebus.network.Network net, com.yahoo.messagebus.routing.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 interfaceMessageHandler
- 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 interfaceReplyHandler
- Parameters:
reply
- The reply that arrived.
-
-