|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovyx.gpars.actor.impl.ReceivingMessageStream
gpars.actor.Actor
class Actor extends ReceivingMessageStream
Actors are active objects, which borrow a thread from a thread pool. The Actor interface provides means to send messages to the actor, start and stop the background thread as well as check its status.
Nested Class Summary | |
---|---|
class |
Actor.MyRemoteHandle
|
class |
Actor.RemoteActor
|
Constructor Summary | |
protected Actor()
|
|
protected Actor(DataFlowExpression joinLatch)
Constructor to be used by deserialization |
Method Summary | |
---|---|
protected RemoteHandle
|
createRemoteHandle(SerialHandle handle, SerialContext host)
|
protected static void
|
deregisterCurrentActorWithThread()
Deregisters the actor registered from the thread |
DataFlowExpression
|
getJoinLatch()
Join-point for this actor |
boolean
|
isActive()
Checks the current status of the Actor. |
boolean
|
isActorThread()
Checks whether the current thread is the actor's worker thread. |
void
|
join()
Joins the actor. |
void
|
join(MessageStream listener)
Notify listener when finished |
void
|
join(long timeout, TimeUnit unit)
Joins the actor. |
void
|
join(BaseDuration duration)
Joins the actor. |
protected static void
|
registerCurrentActorWithThread(Actor currentActor)
Registers the actor with the current thread |
Actor
|
start()
Starts the Actor. |
Actor
|
stop()
Send message to stop to the Actor. |
Actor
|
terminate()
Terminates the Actor. |
static Actor
|
threadBoundActor()
Retrieves the actor registered with the current thread |
Constructor Detail |
---|
protected Actor()
protected Actor(DataFlowExpression joinLatch)
Method Detail |
---|
@Override protected RemoteHandle createRemoteHandle(SerialHandle handle, SerialContext host)
protected static void deregisterCurrentActorWithThread()
public DataFlowExpression getJoinLatch()
public boolean isActive()
public boolean isActorThread()
public final void join()
public final void join(MessageStream listener)
public final void join(long timeout, TimeUnit unit)
public final void join(BaseDuration duration)
protected static void registerCurrentActorWithThread(Actor currentActor)
public Actor start()
public Actor stop()
public Actor terminate()
public static Actor threadBoundActor()
Groovy Documentation