| dalma.impl.EndPointImpl dalma.spi.port.MultiplexedEndPoint
MultiplexedEndPoint | abstract public class MultiplexedEndPoint extends EndPointImpl (Code) | | author: Kohsuke Kawaguchi |
Field Summary | |
final protected Logger | logger Logger for event logging. | final protected Map<Key, Receiver<Key, Msg>> | queue Conversations waiting for replies. |
Method Summary | |
abstract protected Key | getKey(Msg msg) Obtains the key of the message. | protected void | handleMessage(Msg msg) Dispatches a newly received message to the right receiver. | abstract protected void | onNewMessage(Msg msg) Invoked upon receiving a new message that doesn't have any key. | void | register(Receiver<Key, Msg> mr) | abstract protected Key | send(Msg msg) Sends an out-going message, and returns a key that will identify replies. | void | unregister(Receiver<Key, Msg> mr) | protected ReplyIterator<Msg> | waitForMultipleReplies(Msg outgoing, Date expirationDate) Sends out an message and waits for multiple replies. | protected Msg | waitForReply(Msg msg) Sends out an message and waits for a single reply. | protected Msg | waitForReply(Msg msg, Date timeout) Sends out an message and waits for a single reply with timeout. |
logger | final protected Logger logger(Code) | | Logger for event logging.
|
queue | final protected Map<Key, Receiver<Key, Msg>> queue(Code) | | Conversations waiting for replies.
|
MultiplexedEndPoint | protected MultiplexedEndPoint(String name)(Code) | | |
getKey | abstract protected Key getKey(Msg msg)(Code) | | Obtains the key of the message.
Used to find the key of the incoming message.
Parameters: msg - never be null. |
handleMessage | protected void handleMessage(Msg msg)(Code) | | Dispatches a newly received message to the right receiver.
This method needs to be invoked when a new message is received.
|
onNewMessage | abstract protected void onNewMessage(Msg msg)(Code) | | Invoked upon receiving a new message that doesn't have any key.
|
send | abstract protected Key send(Msg msg)(Code) | | Sends an out-going message, and returns a key that will identify replies.
|
waitForMultipleReplies | protected ReplyIterator<Msg> waitForMultipleReplies(Msg outgoing, Date expirationDate)(Code) | | Sends out an message and waits for multiple replies.
TODO:javadoc
|
waitForReply | protected Msg waitForReply(Msg msg)(Code) | | Sends out an message and waits for a single reply.
This method blocks the conversation indefinitely until a reply is received.
always non-null. |
waitForReply | protected Msg waitForReply(Msg msg, Date timeout)(Code) | | Sends out an message and waits for a single reply with timeout.
TODO:javadoc
|
|
|