public interface Actor extends Runnable
ActorManager| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_CATEGORY |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
activate()
Tell this actor it is active.
|
void |
deactivate()
Tell this actor it is no longer active.
|
String |
getCategory()
Get the actor's category.
|
int |
getMaxMessageCount()
Get the maximum number of allowed pending messages.
|
int |
getMessageCount()
Get the number of pending messages.
|
String |
getName()
Get an actor's name.
|
boolean |
isShutdown()
Has shutdown() been called.
|
boolean |
isSuspended()
Test to see if suspended.
|
Message |
peekNext()
See if there is a pending message.
|
Message |
peekNext(String subject)
See if there is a pending message for a subject using exact match.
|
Message |
peekNext(String subject,
boolean isRegExpr)
See if there is a pending message for a subject using reg expr match.
|
boolean |
receive()
Process the next incoming message.
|
boolean |
remove(Message message)
Remove (cancel) an unprocessed message.
|
void |
setCategory(String category)
Set the actor's category.
|
void |
setName(String name)
Set an actors name.
|
void |
setSuspended(boolean f)
Temporarily suspend the reception of messages.
|
void |
shutdown()
End reception of new messages.
|
boolean |
willReceive(String subject)
Test if this actor will receive a send with a specified subject.
|
String getName()
void setName(String name)
String getCategory()
void setCategory(String category)
boolean receive()
boolean willReceive(String subject)
Message peekNext()
Message peekNext(String subject)
subject - target subject of the messageMessage peekNext(String subject, boolean isRegExpr)
subject - target subject of the messageisRegExpr - the subject is a reg expr (vs. simple string)boolean remove(Message message)
message - to removevoid activate()
void deactivate()
void setSuspended(boolean f)
f - boolean isSuspended()
void shutdown()
boolean isShutdown()
int getMessageCount()
int getMaxMessageCount()
Copyright © 2021. All rights reserved.