ajanta.server
Class AgentThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ajanta.server.AgentThread
All Implemented Interfaces:
java.lang.Runnable

public class AgentThread
extends java.lang.Thread

AgentThread is the initial thread created to execute an incoming agent When an agent arrives, a new thread group is created for it, with an identifier that is unique on that server. A single thread is created in this group, and is assigned the task of executing the method specified by the agent as part of its migration request. It loads the StartUp class explicitly using our classloader and create an instance of StartUP class. Invoke the "start" method of this instance which will continue the process of deserializing the agent and invoking its action.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AgentThread(java.lang.ThreadGroup tg, ajanta.server.AgentServer as, ajanta.server.DDEntry dde)
           
 
Method Summary
 boolean checkTermination()
           
 ajanta.server.AgentEnv getAgentEnv()
          return reference to this thread agent environment ...agent server host field
 void run()
          The body of the agent thread
 void setTermination()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentThread

public AgentThread(java.lang.ThreadGroup tg,
                   ajanta.server.AgentServer as,
                   ajanta.server.DDEntry dde)
Parameters:
tg - ThreadGroup of the agent
as - reference to the host agent server
dde - DDEntry corresponding to this agent
Method Detail

getAgentEnv

public ajanta.server.AgentEnv getAgentEnv()
return reference to this thread agent environment ...agent server host field


setTermination

public void setTermination()

checkTermination

public boolean checkTermination()

run

public void run()
The body of the agent thread

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread