aa.tool
Class SystemThread

java.lang.Object
  extended byjava.lang.Thread
      extended byaa.tool.SystemThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
MessageManager, MigrationManager, Platform, TransportSender

public abstract class SystemThread
extends java.lang.Thread

This class includes fundamental behavior of System Actors

History:

Version:
$Date: 2008/01/01 00:23:57 $ $Revision: 1.1 $
Author:
Myeong-Wuk Jang

Field Summary
private  Queue m_qMsgQueue
          In-coming message queue
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SystemThread()
          Cretes a system thread instance.
 
Method Summary
 void deliverMessage(ActorMessage p_amMsg)
          Inserts a message into the in-coming mail queue of this actor, and wake up sleeping actors.
protected abstract  void init()
          Processes some necessay routines before entering the while loop in the run method.
protected abstract  void processMessage(ActorMessage p_amMsg)
          Processes a communication message.
 void run()
          Invoked when this thread is executed.
 
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
 

Field Detail

m_qMsgQueue

private Queue m_qMsgQueue
In-coming message queue

Constructor Detail

SystemThread

public SystemThread()
Cretes a system thread instance.

Method Detail

run

public void run()
Invoked when this thread is executed.


init

protected abstract void init()
Processes some necessay routines before entering the while loop in the run method.
This is an abstract method, and hence, the body part of this method should be implemented by its sub-class.


processMessage

protected abstract void processMessage(ActorMessage p_amMsg)
Processes a communication message.
This is an abstract method, and hence, the body part of this method should be implemented by its sub-class.

Parameters:
p_amMsg - an actor communication message to be processed.

deliverMessage

public void deliverMessage(ActorMessage p_amMsg)
Inserts a message into the in-coming mail queue of this actor, and wake up sleeping actors.

Parameters:
p_amMsg - an actor communication message to be delivered to this actor.