|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgpars.agent.AgentCore
@SuppressWarnings({"UnqualifiedStaticUsage"}) class AgentCore
Constructor Summary | |
AgentCore()
|
Method Summary | |
---|---|
void
|
attachToThreadPool(Pool threadPool)
Sets a new thread pool to be used by the agent |
void
|
call(Object message)
Adds the message to the agent\s message queue |
List
|
getErrors()
Retrieves a list of exception thrown within the agent's body. |
Pool
|
getThreadPool()
Retrieves the thread pool used by the agent |
void
|
handleMessage(Object message)
Dynamically dispatches the method call |
boolean
|
isFair()
Retrieves the agent's fairness flag Fair agents give up the thread after processing each message, non-fair agents keep a thread until their message queue is empty. |
void
|
leftShift(Object message)
Adds the message to the agent\s message queue |
void
|
makeFair()
Makes the agent fair. |
void
|
run()
Handles a single message from the message queue |
void
|
schedule()
Schedules processing of a next message, if there are some and if there isn't an active thread handling a message at the moment |
void
|
send(Object message)
Adds the message to the agent\s message queue |
void
|
setPGroup(PGroup pGroup)
Sets an actor group to use for task scheduling |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
AgentCore()
Method Detail |
---|
public final void attachToThreadPool(Pool threadPool)
@SuppressWarnings({"UnusedDeclaration"}) public final void call(Object message)
@SuppressWarnings({"SynchronizedMethod", "ReturnOfCollectionOrArrayField"}) public List getErrors()
public final Pool getThreadPool()
public void handleMessage(Object message)
public boolean isFair()
@SuppressWarnings({"UnusedDeclaration"}) public final void leftShift(Object message)
public void makeFair()
@SuppressWarnings({"CatchGenericClass"}) public void run()
public void schedule()
public final void send(Object message)
public void setPGroup(PGroup pGroup)
Groovy Documentation