public class PendingMessage extends Object
Constructor and Description |
---|
PendingMessage()
Create a new PendingMessage.
|
PendingMessage(int messageId,
Message message)
Create a new PendingMessage.
|
PendingMessage(int messageId,
Message message,
Callback<Reply> replyCallback)
Create a new PendingMessage.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the state of the message allowing the referenced objects to be
garbage collected.
|
Message |
getMessage()
Returns the sent message.
|
int |
getMessageId()
Returns the message id assigned to the sent message.
|
Callback<Reply> |
getReplyCallback()
Returns the callback for the reply to the message.
|
void |
set(int messageId,
Message message,
Callback<Reply> replyCallback)
Sets the state of the pending message.
|
void |
set(PendingMessage other)
Sets the state of the pending message.
|
public PendingMessage()
public PendingMessage(int messageId, Message message)
messageId
- The id assigned to the message.message
- The sent message.public void clear()
public Message getMessage()
public int getMessageId()
public Callback<Reply> getReplyCallback()
public void set(int messageId, Message message, Callback<Reply> replyCallback)
messageId
- The id of the sent message.message
- The sent message.replyCallback
- The callback for the message. May be null.public void set(PendingMessage other)
other
- The pending message to copy from.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.