public class Sequencer extends Object implements MessageHandler, ReplyHandler
Constructor and Description |
---|
Sequencer(MessageHandler sender)
Constructs a new sequencer on top of the given async sender.
|
Modifier and Type | Method and Description |
---|---|
boolean |
destroy()
Sets the destroyed flag to true.
|
void |
handleMessage(Message msg)
All messages pass through this handler when being sent by the owning source session.
|
void |
handleReply(Reply reply)
Lookup the sequencing id of an incoming reply to pop the front of the corresponding queue, and then send the next
message in line, if any.
|
public Sequencer(MessageHandler sender)
sender
- The underlying sender.public boolean destroy()
public void handleMessage(Message msg)
handleMessage
in interface MessageHandler
msg
- The message to send.public void handleReply(Reply reply)
handleReply
in interface ReplyHandler
reply
- The reply received.Copyright © 2018. All rights reserved.