org.curjent.impl.agent
Class Messenger

java.lang.Object
  extended by org.curjent.impl.agent.Messenger
All Implemented Interfaces:
Runnable

final class Messenger
extends Object
implements Runnable

Background thread processor. The Executor for the agent is given a runnable messenger to run. Delegates all work from individual background threads to the central Controller.


Field Summary
(package private)  Controller controller
          The messenger's controller.
(package private)  Message message
          Current executing message for this messenger.
(package private)  Object task
          The acquired AgentTasks instance that performs the call.
(package private)  Thread thread
          Current thread running this messenger.
 
Constructor Summary
Messenger(Controller controller, Object task)
          Saves the controller and task for executing messages.
 
Method Summary
 void run()
          Calls Controller.run(Messenger).
 String toString()
          Returns a summary of the message that's executing if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

controller

final Controller controller
The messenger's controller.


task

final Object task
The acquired AgentTasks instance that performs the call.


thread

Thread thread
Current thread running this messenger. Used for deadlock detection.


message

Message message
Current executing message for this messenger.

Constructor Detail

Messenger

Messenger(Controller controller,
          Object task)
Saves the controller and task for executing messages.

Method Detail

run

public void run()
Calls Controller.run(Messenger).

Specified by:
run in interface Runnable

toString

public String toString()
Returns a summary of the message that's executing if any.

Overrides:
toString in class Object


Copyright 2009-2011 Tom Landon
Apache License 2.0