| 
org.codehaus.gpars | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovyx.gpars.agent.AgentCore
@SuppressWarnings({"UnqualifiedStaticUsage"})
public abstract class AgentCore
| Field Summary | |
|---|---|
        private AsyncMessagingCore | 
        
            core
             | 
        
        private java.util.List | 
        
            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
         | 
        
            getErrors()
            Retrieves a list of exception thrown within the agent's body.  | 
        
            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.  | 
        
            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(PGroup pGroup)
            Sets an actor group to use for task scheduling  | 
        
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() | 
| Field Detail | 
|---|
private final AsyncMessagingCore core
private java.util.List errors
| Constructor Detail | 
|---|
protected AgentCore()
| Method Detail | 
|---|
public final void attachToThreadPool(Pool threadPool)
threadPool -  The thread pool to use
@SuppressWarnings({"UnusedDeclaration"})
public final void call(java.lang.Object message)
        message -  A value or a closure
@SuppressWarnings({"SynchronizedMethod", "ReturnOfCollectionOrArrayField"})
public java.util.List getErrors()
        
void handleMessage(java.lang.Object message)
message -  A value or a closure
@SuppressWarnings({"SynchronizedMethod"})
public boolean hasErrors()
        
public boolean isFair()
@SuppressWarnings({"UnusedDeclaration"})
public final void leftShift(java.lang.Object message)
        message -  A value or a closure
public void makeFair()
@SuppressWarnings({"MethodOnlyUsedFromInnerClass", "SynchronizedMethod"})
void registerError(java.lang.Throwable e)
        e -  The exception to store
public final void send(java.lang.Object message)
message -  A value or a closure
public void setPGroup(PGroup pGroup)
pGroup -  The pGroup to use
Copyright © 2008–2012 Václav Pech. All Rights Reserved.