fr.dyade.aaa.agent
Class AgentAdmin

java.lang.Object
  extended byfr.dyade.aaa.agent.Agent
      extended byfr.dyade.aaa.agent.AgentAdmin
All Implemented Interfaces:
AgentMBean, java.io.Serializable

public final class AgentAdmin
extends Agent

See Also:
Serialized Form

Field Summary
static int CONFIGURED
           
static int NONE
           
static int STARTED
           
static int STOPED
           
 
Fields inherited from class fr.dyade.aaa.agent.Agent
fixed, name
 
Constructor Summary
AgentAdmin(short maxId)
          Creates a local administration agent.
 
Method Summary
protected  void agentInitialize(boolean firstTime)
          Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory.
static AgentId getDefault()
          get AgentId of AgentServer
static AgentId getDefault(short serverId)
          get default AgentId of AgentAdmin
 java.lang.Short getSid()
           
static void init(java.lang.String args, boolean firstTime)
          Initializes the package as a well known service.
 void react(AgentId from, Notification not)
          Reacts to AgentAdmin specific notifications.
static void stopService()
           
 
Methods inherited from class fr.dyade.aaa.agent.Agent
agentFinalize, delete, delete, deploy, deploy, getId, getLogTopic, getName, isDeployed, isFixed, needToBeCommited, save, sendTo, sendTo, sendTo, setNoSave, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

CONFIGURED

public static final int CONFIGURED
See Also:
Constant Field Values

STOPED

public static final int STOPED
See Also:
Constant Field Values

STARTED

public static final int STARTED
See Also:
Constant Field Values
Constructor Detail

AgentAdmin

public AgentAdmin(short maxId)
Creates a local administration agent.

Method Detail

getDefault

public static AgentId getDefault(short serverId)
get default AgentId of AgentAdmin


getDefault

public static AgentId getDefault()
get AgentId of AgentServer


init

public static void init(java.lang.String args,
                        boolean firstTime)
                 throws java.lang.Exception
Initializes the package as a well known service.

Creates a AgentAdmin agent with the well known stamp AgentId.AdminIdStamp.

Parameters:
args - parameters from the configuration file
firstTime - true when agent server starts anew
Throws:
java.lang.Exception - unspecialized exception

stopService

public static void stopService()

agentInitialize

protected void agentInitialize(boolean firstTime)
                        throws java.lang.Exception
Description copied from class: Agent
Gives this agent an opportunity to initialize after having been deployed, and each time it is loaded into memory.

This function is first called by the factory agent, just after it deploys the agent.

This function is used by agents with a fixed field set to true to initialize their transient variables, as it is called each time the agent server is restarted.

This function is not declared final so that derived classes may change their reload policy. The implementation of this method provided by the Agent class does nothing.

Overrides:
agentInitialize in class Agent
Parameters:
firstTime - true when first called by the factory
Throws:
java.lang.Exception - unspecialized exception

react

public void react(AgentId from,
                  Notification not)
           throws java.lang.Exception
Reacts to AgentAdmin specific notifications. Analyzes the notification request code, then do the appropriate work. By default calls react from base class. Handled notification types are : AdminRequest, AdminStartStopNot

Overrides:
react in class Agent
Parameters:
from - agent sending notification
not - notification to react to
Throws:
java.lang.Exception - unspecialized exception

getSid

public java.lang.Short getSid()


Copyright ? 2004 Scalagent - All rights reserved