public class DynamicJadeGateway
extends java.lang.Object
Constructor and Description |
---|
DynamicJadeGateway() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(GatewayListener l) |
void |
checkJADE()
This method checks if both the container, and the agent, are up and running.
|
AID |
createAID(java.lang.String localName) |
void |
execute(java.lang.Object command)
execute a command.
|
void |
execute(java.lang.Object command,
long timeout)
Execute a command specifying a timeout.
|
java.lang.String |
getProfileProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key in the JADE Platform Profile.
|
void |
init(java.lang.String agentClassName,
java.lang.Object[] agentArgs,
Properties jadeProfile)
Initialize this gateway by passing the proper configuration parameters
|
void |
init(java.lang.String agentClassName,
Properties jadeProfile) |
void |
init(java.lang.String agentName,
java.lang.String agentClassName,
java.lang.Object[] agentArgs,
Properties jadeProfile)
Initialize this gateway by passing the proper configuration parameters
|
boolean |
isGatewayActive()
Return the state of JadeGateway
|
void |
removeListener(GatewayListener l) |
void |
shutdown()
Kill the JADE Container in case it is running.
|
public final java.lang.String getProfileProperty(java.lang.String key, java.lang.String defaultValue)
key
- - the property key.defaultValue
- - a default valueProperties.getProperty(String, String)
public final void execute(java.lang.Object command) throws StaleProxyException, ControllerException, java.lang.InterruptedException
releaseCommand
is called by the executor agent)StaleProxyException
- if the method was not able to execute the CommandControllerException
java.lang.InterruptedException
AgentController.putO2AObject(Object, boolean)
public final void execute(java.lang.Object command, long timeout) throws StaleProxyException, ControllerException, java.lang.InterruptedException
java.lang.InterruptedException
- if the timeout expires or the Thread
executing this method is interrupted.StaleProxyException
- if the method was not able to execute the CommandControllerException
AgentController.putO2AObject(Object, boolean)
public void checkJADE() throws StaleProxyException, ControllerException
public final void init(java.lang.String agentName, java.lang.String agentClassName, java.lang.Object[] agentArgs, Properties jadeProfile)
agentName
- is the name of the JadeGateway internal agent. If null is passed
the default name will be used.agentClassName
- is the fully-qualified class name of the JadeGateway internal agent. If null is passed
the default class will be used.agentArgs
- is the list of agent argumentsjadeProfile
- the properties that contain all parameters for running JADE (see jade.core.Profile).
Typically these properties will have to be read from a JADE configuration file.
If jadeProfile is null, then a JADE container attaching to a main on the local host is launchedpublic final void init(java.lang.String agentClassName, java.lang.Object[] agentArgs, Properties jadeProfile)
agentClassName
- is the fully-qualified class name of the JadeGateway internal agent. If null is passed
the default class will be used.agentArgs
- is the list of agent argumentsjadeProfile
- the properties that contain all parameters for running JADE (see jade.core.Profile).
Typically these properties will have to be read from a JADE configuration file.
If jadeProfile is null, then a JADE container attaching to a main on the local host is launchedpublic final void init(java.lang.String agentClassName, Properties jadeProfile)
public void shutdown()
public boolean isGatewayActive()
public AID createAID(java.lang.String localName)
public void addListener(GatewayListener l)
public void removeListener(GatewayListener l)