aa.core
Class MessageManager

java.lang.Object
  extended byjava.lang.Thread
      extended byaa.tool.SystemThread
          extended byaa.core.MessageManager
All Implemented Interfaces:
java.lang.Runnable

public class MessageManager
extends SystemThread

This class delivers communication messages among actors.

History:

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

Field Summary
private  ActorManager m_amActorManager
          The reference to the Actor Manager of this actor platform.
private  ActorName m_anPlatform
          The actor name of this actor platform.
private  DelayedMessageManager m_dmmDelayedMessageManager
          The reference to the Delayed Message Manager of this actor platform.
private  Platform m_pPlatform
          The reference to this actor platform.
private  TransportManager m_tmTransportManager
          The reference to the Transport Manager of this actor platform.
private  TransportSender m_tsTransportSender
          The reference to the Transport Sender of this actor platform.
 
Fields inherited from class aa.tool.SystemThread
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MessageManager(Platform p_platform, ActorManager p_amActorManager, MigrationManager p_mmMigrationManager, java.lang.Integer p_intPort)
          Creates a Message Manager.
 
Method Summary
protected  void changePortNumber(java.lang.Integer p_intPort)
          Changes the port number for transprot manager.
protected  void init()
          Processes some necessay routines before entering the while loop in the run method.
protected  void processMessage(ActorMessage p_amMsg)
          Processes a communicaiton message.
 void reportFailure(java.lang.String p_strMsg)
          Reports the failure of server socket initiation.
protected  void uninit()
          Uninitializes this program.
 
Methods inherited from class aa.tool.SystemThread
deliverMessage, run
 
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_anPlatform

private ActorName m_anPlatform
The actor name of this actor platform.


m_pPlatform

private Platform m_pPlatform
The reference to this actor platform.


m_amActorManager

private ActorManager m_amActorManager
The reference to the Actor Manager of this actor platform.


m_tmTransportManager

private TransportManager m_tmTransportManager
The reference to the Transport Manager of this actor platform.


m_tsTransportSender

private TransportSender m_tsTransportSender
The reference to the Transport Sender of this actor platform.


m_dmmDelayedMessageManager

private DelayedMessageManager m_dmmDelayedMessageManager
The reference to the Delayed Message Manager of this actor platform.

Constructor Detail

MessageManager

public MessageManager(Platform p_platform,
                      ActorManager p_amActorManager,
                      MigrationManager p_mmMigrationManager,
                      java.lang.Integer p_intPort)
Creates a Message Manager.

Parameters:
p_platform - the reference to a platform.
p_amActorManager - the reference to an Actor Manager.
p_mmMigrationManager - the reference to a Migration Manager.
p_intPort - the port number of a server socket for in-coming messages.
Method Detail

init

protected void init()
Processes some necessay routines before entering the while loop in the run method.
This is called by the run method of the super class.

Specified by:
init in class SystemThread

uninit

protected void uninit()
Uninitializes this program.
This method is called by the Plaform.


processMessage

protected void processMessage(ActorMessage p_amMsg)
Processes a communicaiton message.

Specified by:
processMessage in class SystemThread
Parameters:
p_amMsg - an actor communication message.

changePortNumber

protected void changePortNumber(java.lang.Integer p_intPort)
Changes the port number for transprot manager.

Parameters:
p_intPort - the new port number for transport manager.

reportFailure

public void reportFailure(java.lang.String p_strMsg)
Reports the failure of server socket initiation.
This method is called by the Transport Manager.

Parameters:
p_strMsg - the message for which problem happens.