|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--com.ibm.able.AbleObject | +--com.ibm.able.agents.AbleDefaultAgent | +--com.ibm.able.platform.agents.FipaAgentDefaultAgent | +--com.ibm.able.platform.agents.FipaAmsAgentAppl
This class provides an implementation of a FIPA Agent Management System (AMS) agent.
This implementation of an AMS agent will
This agent will also register itself with itself and the DF.
Fields inherited from class com.ibm.able.platform.agents.FipaAgentDefaultAgent |
myAmsAd,
myDfAd,
myDfServices |
Fields inherited from class com.ibm.able.agents.AbleDefaultAgent |
activeDataSource,
agentAddr,
agentHost,
agentName,
beans,
effectors,
eventConnections,
numEpochs,
processList,
processListOK,
sensors |
Fields inherited from class com.ibm.able.AbleObject |
changed,
chgSupport,
comment,
dataFlowEnabled,
destBufferConnections,
eventQueue,
fileName,
inputBuffer,
listeners,
logger,
name,
outputBuffer,
parent,
propertyConnectionMgr,
sourceBufferConnections,
state,
stateChgSupport |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
FipaAmsAgentAppl()
Create a new Able Platform FIPA AMS agent. |
Method Summary | |
void |
authenticate(FipaAmsAgentDescription theDescription)
Authenticate a registered agent. |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
java.lang.Object |
createAgent(FipaAmsAgentDescription theDescription)
Create an agent on this or another host as specified in the description, and then register it with this AMS. |
FipaAmsAgentDescription |
deregisterAgent(FipaAmsAgentDescription theDescription)
Deregister an agent from this AMS. |
java.util.Hashtable |
getRegisteredAgents()
Get all the registered agents from this AMS. |
void |
init()
Initialize and configure the agent. |
void |
invokeAgent(java.lang.String theAgentName)
Invoke a registered agent. |
static void |
main(java.lang.String[] args)
Create a FIPA AMS agent and register it with RMI so that it is available over the network. |
void |
modifyAgent(FipaAmsAgentDescription theDescription)
Modify a registered agent. |
FipaApDescription |
queryPlatformProfile()
Retrieve the platform profile for this distributed agent platform. |
void |
quitAgent()
Terminate this agent. |
FipaAmsAgentDescription |
registerAgent(FipaAmsAgentDescription theDescription)
Register an agent with this AMS. |
FipaAmsAgentDescription |
searchAgent(FipaAmsAgentDescription theDescription)
Search the agent registry for an agent with specific attributes. |
void |
terminateAgent(java.lang.String theAgentName)
Terminate a registered agent. |
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
Methods inherited from class com.ibm.able.platform.agents.FipaAgentDefaultAgent |
deregisterWithAms,
deregisterWithDf,
destroyAgent,
executeAgent,
invokeAgent,
moveAgent,
msgAcceptProposal,
msgAgree,
msgCancel,
msgCfp,
msgConfirm,
msgDisconfirm,
msgFailure,
msgInform,
msgInformIf,
msgInformRef,
msgNotUnderstood,
msgPropose,
msgQueryIf,
msgQueryRef,
msgRefuse,
msgRejectProposal,
msgRequest,
msgRequestWhen,
msgRequestWhenever,
msgSubscribe,
registerWithAms,
registerWithDf,
resumeAgent,
suspendAgent,
waitAgent,
wakeUpAgent |
Methods inherited from class com.ibm.able.agents.AbleDefaultAgent |
addBean,
addEffector,
addEventConnection,
addSensor,
buildProcessList,
clsNm,
containsBean,
containsBean,
debugTrace,
getAgentAddr,
getAgentHost,
getAgentName,
getBean,
getBeans,
getDataSource,
getEffectors,
getNumEpochs,
getProcessList,
getSensors,
handleAbleEvent,
init,
invokeEffector,
invokeSensor,
isActiveDataSource,
process,
propertyChange,
quitAll,
quitEnabledEventProcessing,
removeAllBeans,
removeBean,
removeEffector,
removeEventConnection,
removeSensor,
reset,
resumeAll,
rmiRebind,
rmiUnbind,
setActiveDataSource,
setEffectors,
setProcessList,
setSensors,
suspendAll |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toStub |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public FipaAmsAgentAppl() throws java.rmi.RemoteException
The name and comment are set to pre-defined values, but the agent does not otherwise initialise itself or begin running until init() is called.
Method Detail |
public FipaAmsAgentDescription registerAgent(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
theDescription
- A FIPA AMS agent description identifying the agent to
be registered.
public FipaAmsAgentDescription deregisterAgent(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
theDescription
- A FIPA AMS agent description identifying the agent to
be deregistered.
The agent must, of course, already be registered with this AMS.
public FipaAmsAgentDescription searchAgent(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
NOTE that this method currently searches only by name!
theDescription
- A FIPA AMS agent description containing search attributes.
public void modifyAgent(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
NOTE that this method currently does nothing!
theDescription
- A FIPA AMS agent description identifying the agent to
be modified, and how it is to be modified.
The agent must, of course, be registered with this AMS.
public void authenticate(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
NOTE that this method currently does nothing!
theDescription
- A FIPA AMS agent description identifying the agent to
be authenticated.
The agent must, of course, be registered with this AMS.
public FipaApDescription queryPlatformProfile() throws java.rmi.RemoteException
public java.lang.Object createAgent(FipaAmsAgentDescription theDescription) throws java.rmi.RemoteException
Note that this method does not init() the agent! It is up to the caller to initialise the agent by calling its init() method when ready to do so.
theDescription
- A FIPA AMS agent description identifying the agent to
be created, and where it is to be created. Note that
an AblePlatformSupport object must be running on the
host where the agent is to be created.
public void invokeAgent(java.lang.String theAgentName) throws java.rmi.RemoteException
This implementation simply calls the specified agent's startEnabledEventProcesing() method (which is also available through direct invocation).
theAgentName
- A String containing the name of the agent to invoke.
The agent must, of course, be registered with this
AMS. If the agent is not registered, this method does
nothing.
public void terminateAgent(java.lang.String theAgentName) throws java.rmi.RemoteException
This implementation simply calls the specified agent's quitEnabledEventProcessing() method (which is also available through direct invocation). It is up to the caller to also deregister the agent, if necessary, from any services with which the specified agent is registered.
theAgentName
- A String containing the name of the agent to invoke.
The agent must, of course, be registered with this
AMS. If the agent is not registered, this method does
nothing.
public java.util.Hashtable getRegisteredAgents() throws java.rmi.RemoteException
public void quitAgent() throws java.rmi.RemoteException
public void init() throws java.rmi.RemoteException
In this implementation the bean's state changes from AbleState.Uninitiated to AbleState.Initiated; timer event processing is disabled; both Able event posting and processing are enabled; and the asynchronous thread is started.
Furthermore, the Agent Platform Description is set up; the AMS Agent Description is filled in; the AMS registers with itself; the DF and ACC agents are started, if necessary; and a tuple space is set up on the server specified in the user's platform.preferences file.
public static void main(java.lang.String[] args)
public java.lang.String toString()
public static java.lang.String Copyright()
|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |