| 限定符和类型 | 字段和说明 |
|---|---|
protected Object |
data |
protected long |
delayUntil |
protected List<MessageListener> |
listeners |
protected Actor |
source |
protected String |
subject |
| 限定符 | 构造器和说明 |
|---|---|
protected |
DefaultMessage() |
|
DefaultMessage(String subject) |
|
DefaultMessage(String subject,
Object data) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMessageListener(MessageListener l) |
Message |
assignSender(Actor sender)
Set the sender of a clone of this message.
|
protected String |
bodyString() |
void |
fireMessageListeners(MessageEvent e) |
Object |
getData()
Get any parameter data associated with the message.
|
long |
getDelayUntil()
Ge the delay value.
|
Actor |
getSource()
Get the sender of the message.
|
String |
getSubject()
Get the subject (AKA command) of the message.
|
void |
removeMessageListener(MessageListener l) |
protected void |
setData(Object data)
Sets data associated with this message; can be null.
|
void |
setDelayUntil(long delayUntil)
Used to delay message execution until some moment in time has passed.
|
protected void |
setSource(Actor source)
Sets the sender of this message; can be null.
|
protected void |
setSubject(String subject)
Sets the subject (command) this message implies; can be null.
|
boolean |
subjectMatches(Pattern p)
Test if this message subject matches a reg expr.
|
boolean |
subjectMatches(String s)
Test if this message subject matches a string.
|
String |
toString() |
protected long delayUntil
protected Actor source
protected String subject
protected Object data
protected List<MessageListener> listeners
public DefaultMessage(String subject)
protected DefaultMessage()
public long getDelayUntil()
public void setDelayUntil(long delayUntil)
delayUntil - future time (in millis since epoch)protected void setSource(Actor source)
public String getSubject()
MessagegetSubject 在接口中 Messageprotected void setSubject(String subject)
public Object getData()
Messageprotected void setData(Object data)
protected String bodyString()
public boolean subjectMatches(String s)
public boolean subjectMatches(Pattern p)
public void addMessageListener(MessageListener l)
public void removeMessageListener(MessageListener l)
public void fireMessageListeners(MessageEvent e)
Copyright © 2021. All rights reserved.