fr.dyade.aaa.agent

Class AgentAdmin

Implemented Interfaces:
AgentMBean, Serializable

public final class AgentAdmin
extends Agent

Field Summary

static int
CONFIGURED
static int
NONE
static int
STARTED
static int
STOPED

Fields inherited from class fr.dyade.aaa.agent.Agent

fixed, logmon, 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
Short
getSid()
static void
init(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, agentInitialize, delete, delete, deploy, deploy, getId, getLogTopic, getName, isDeployed, isFixed, needToBeCommited, react, save, sendTo, sendTo, sendTo, setNoSave, toString

Field Details

CONFIGURED

public static final int CONFIGURED

Field Value:
1


NONE

public static final int NONE

Field Value:
0


STARTED

public static final int STARTED

Field Value:
3


STOPED

public static final int STOPED

Field Value:
2

Constructor Details

AgentAdmin

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

Method Details

agentInitialize

protected void agentInitialize(boolean firstTime)
            throws Exception
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 interface Agent

Parameters:
firstTime - true when first called by the factory


getDefault

public static AgentId getDefault()
get AgentId of AgentServer


getDefault

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


getSid

public Short getSid()


init

public static void init(String args,
                        boolean firstTime)
            throws 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


react

public void react(AgentId from,
                  Notification not)
            throws 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 interface Agent

Parameters:
from - agent sending notification
not - notification to react to


stopService

public static void stopService()


Copyright B) 2004 Scalagent - All rights reserved