|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgroovyx.gpars.agent.AgentCore
public abstract class AgentCore
| Field Summary | |
|---|---|
private AsyncMessagingCore |
core
|
private java.util.List<java.lang.Throwable> |
errors
Holds agent errors |
| Constructor Summary | |
|---|---|
protected |
AgentCore()
|
| Method Summary | |
|---|---|
void |
attachToThreadPool(Pool threadPool)
Sets a new thread pool to be used by the agent |
void |
call(java.lang.Object message)
Adds the message to the agent\s message queue |
java.util.List<java.lang.Throwable> |
getErrors()
Retrieves a list of exception thrown within the agent's body. |
(package private) abstract void |
handleMessage(java.lang.Object message)
Dynamically dispatches the method call |
boolean |
hasErrors()
Indicates whether there have been exception thrown within the agent's body. |
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(java.lang.Object message)
Adds the message to the agent\s message queue |
void |
makeFair()
Makes the agent fair. |
(package private) void |
registerError(java.lang.Throwable e)
Adds the exception to the list of thrown exceptions |
void |
send(java.lang.Object message)
Adds the message to the agent\s message queue |
void |
setPGroup(groovyx.gpars.group.PGroup pGroup)
Sets an actor group to use for task scheduling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final AsyncMessagingCore core
private java.util.List<java.lang.Throwable> errors
| Constructor Detail |
|---|
protected AgentCore()
| Method Detail |
|---|
public final void attachToThreadPool(Pool threadPool)
threadPool - The thread pool to usepublic void setPGroup(groovyx.gpars.group.PGroup pGroup)
pGroup - The pGroup to usepublic boolean isFair()
public void makeFair()
public final void send(java.lang.Object message)
message - A value or a closurepublic final void leftShift(java.lang.Object message)
message - A value or a closurepublic final void call(java.lang.Object message)
message - A value or a closureabstract void handleMessage(java.lang.Object message)
message - A value or a closurevoid registerError(java.lang.Throwable e)
e - The exception to storepublic java.util.List<java.lang.Throwable> getErrors()
public boolean hasErrors()
|
Copyright © 2008–2010 Václav Pech. All Rights Reserved. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||