public class Platform
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Platform.RemoteStartAgentWaiter
The Class RemoteStartAgentWaiter.
|
static class |
Platform.SystemAgent
The enumeration that names the system agents like the RMA and other.
|
Constructor and Description |
---|
Platform()
Constructor of this class.
|
Modifier and Type | Method and Description |
---|---|
jade.wrapper.AgentContainer |
createAgentContainer(java.lang.String newContainerName)
Adding an AgentContainer to the local platform.
|
java.util.ArrayList<jade.wrapper.AgentContainer> |
getAgentContainerList()
Returns the List of local agent container.
|
jade.wrapper.AgentContainer |
getContainer(java.lang.String containerNameSearch)
Returns the
AgentContainer given by it's name. |
jade.core.ProfileImpl |
getContainerProfile()
This method returns the JADE-Profile, which has to be used
for the container-profiles.
|
jade.wrapper.AgentContainer |
getMainContainer()
Returns the Jade main container.
|
NetworkAddresses |
getNetworkAddresses()
Returns the currently available network addresses / IP's.
|
int |
getSuffixNoForAgentName(java.lang.String agentName)
Returns a new suffix number for the specified name of an agent.
|
java.util.Hashtable<Platform.SystemAgent,java.lang.String> |
getSystemAgentClasses()
Returns the relation of known system agents, like the rma or the sniffer, and its classes.
|
boolean |
isAgentRunning(java.lang.String localAgentName)
Checks, if the specified Agent is running (or not).
|
boolean |
isAgentRunning(java.lang.String localAgentName,
jade.wrapper.AgentContainer agentContainer)
Checks, whether one Agent is running (or not) in the specified container.
|
boolean |
isAgentRunning(java.lang.String localAgentName,
java.lang.String localContainerName)
Checks, whether one Agent is running (or not) in the specified container
|
boolean |
isAgentRunningInMainContainer(java.lang.String localAgentName)
Checks, whether one Agent is running (or not) in the main-container.
|
boolean |
isMainContainerRunning()
Jade main container is running.
|
boolean |
isMainContainerRunning(boolean forceJadeStart)
Checks, whether the main-container (Jade himself) is running or not.
|
void |
killAgentInMainContainer(java.lang.String localAgentName)
Kills an agent in the MainContainer, if it is running.
|
void |
killContainer(java.lang.String containerName)
Kills an AgentContainer to the local platform.
|
boolean |
start()
Starts JADE without displaying the RMA
|
boolean |
start(boolean showRMA)
Starts JADE.
|
boolean |
start(boolean showRMA,
jade.core.Profile containerProfile)
Starts JADE.
|
boolean |
start4EmbeddedSystemAgent()
Start JADE for a globally specified embedded system agent.
|
boolean |
start4EmbeddedSystemAgent(java.lang.String agentName,
java.lang.String agentClassName)
Start JADE for a specified embedded system agent.
|
void |
startAgent(java.lang.String agentName,
java.lang.Class<? extends jade.core.Agent> agentClass,
java.lang.Object[] startArguments,
java.lang.String inContainer)
Starts an agent as specified
|
void |
startAgent(java.lang.String agentName,
java.lang.String agentClassName)
Adding an Agent to a Container.
|
void |
startAgent(java.lang.String agentName,
java.lang.String agentClassName,
java.lang.Object[] startArguments)
Starts an agent as specified
|
void |
startAgent(java.lang.String agentName,
java.lang.String agentClassName,
java.lang.Object[] startArguments,
java.lang.String inContainer)
Starts an agent as specified
|
void |
startAgent(java.lang.String agentName,
java.lang.String agentClassName,
java.lang.String inContainer)
Starts an agent as specified
|
void |
startSystemAgent(Platform.SystemAgent systemAgentToStart,
java.lang.Integer optionalSuffixNo)
Starts an Agent, if the main-container exists.
|
void |
startSystemAgent(Platform.SystemAgent systemAgentToStart,
java.lang.Integer optionalSuffixNo,
java.lang.Object[] openArgs)
Starts agents that are available by JADE or Agent.Workbench like the rma, sniffer etc.
|
void |
startUtilityAgent(java.lang.Object[] utilityAgentStartArguments)
Starts the Utility-Agent with the specified start arguments.
|
void |
startUtilityAgent(UtilityAgent.UtilityAgentJob utilityAgentJob)
Starts the Utility-Agent with a job defined in its start argument.
|
void |
stop()
Shutting down the jade-platform.
|
boolean |
stopAskUserBefore()
Asks the user to shutdown Jade.
|
public NetworkAddresses getNetworkAddresses()
public boolean start()
public boolean start(boolean showRMA)
showRMA
- set true, if you want also to start the RMA agent and its visualizationpublic boolean start(boolean showRMA, jade.core.Profile containerProfile)
showRMA
- set true, if you want also to start the RMA agent and its visualizationcontainerProfile
- the actual container Profilepublic boolean start4EmbeddedSystemAgent()
public boolean start4EmbeddedSystemAgent(java.lang.String agentName, java.lang.String agentClassName)
defaultAgentName
- the agents nameagentClassName
- the agent class namepublic jade.core.ProfileImpl getContainerProfile()
public void stop()
public boolean stopAskUserBefore()
public boolean isMainContainerRunning(boolean forceJadeStart)
forceJadeStart
- will force the jade start, if JADE is not runningpublic boolean isMainContainerRunning()
public void startUtilityAgent(UtilityAgent.UtilityAgentJob utilityAgentJob)
utilityAgentJob
- the job for the utility UtilityAgent to doUtilityAgent.UtilityAgentJob
,
UtilityAgent
public void startUtilityAgent(java.lang.Object[] utilityAgentStartArguments)
utilityAgentStartArguments
- the utility agent start argumentspublic void startSystemAgent(Platform.SystemAgent systemAgentToStart, java.lang.Integer optionalSuffixNo)
systemAgentToStart
- the system agent to startoptionalSuffixNo
- the optional postfix nopublic void startSystemAgent(Platform.SystemAgent systemAgentToStart, java.lang.Integer optionalSuffixNo, java.lang.Object[] openArgs)
systemAgentToStart
- the system agent to startoptionalSuffixNo
- an optional postfix noopenArgs
- the open argumentspublic java.util.Hashtable<Platform.SystemAgent,java.lang.String> getSystemAgentClasses()
public int getSuffixNoForAgentName(java.lang.String agentName)
defaultAgentName
- the agent namepublic void killAgentInMainContainer(java.lang.String localAgentName)
localAgentName
- the agent namepublic boolean isAgentRunningInMainContainer(java.lang.String localAgentName)
localAgentName
- the agent namepublic boolean isAgentRunning(java.lang.String localAgentName)
localAgentName
- the agent namepublic boolean isAgentRunning(java.lang.String localAgentName, java.lang.String localContainerName)
localAgentName
- the agent namelocalContainerName
- the local container namepublic boolean isAgentRunning(java.lang.String localAgentName, jade.wrapper.AgentContainer agentContainer)
localAgentName
- the agent nameagentContainer
- the agent containerpublic jade.wrapper.AgentContainer getMainContainer()
public jade.wrapper.AgentContainer createAgentContainer(java.lang.String newContainerName)
newContainerName
- the container namepublic java.util.ArrayList<jade.wrapper.AgentContainer> getAgentContainerList()
public jade.wrapper.AgentContainer getContainer(java.lang.String containerNameSearch)
AgentContainer
given by it's name.containerNameSearch
- the container name searchpublic void killContainer(java.lang.String containerName)
containerName
- the container namepublic void startAgent(java.lang.String agentName, java.lang.String agentClassName)
defaultAgentName
- the agent nameagentClassName
- the agent class namepublic void startAgent(java.lang.String agentName, java.lang.String agentClassName, java.lang.String inContainer)
defaultAgentName
- the agent nameagentClassName
- the agent class nameinContainer
- the container namepublic void startAgent(java.lang.String agentName, java.lang.String agentClassName, java.lang.Object[] startArguments)
defaultAgentName
- the agent nameagentClassName
- the agent class namestartArguments
- the start arguments for the agentpublic void startAgent(java.lang.String agentName, java.lang.String agentClassName, java.lang.Object[] startArguments, java.lang.String inContainer)
defaultAgentName
- the agent nameagentClassName
- the agent class namestartArguments
- the start arguments for the agentinContainer
- the container namepublic void startAgent(java.lang.String agentName, java.lang.Class<? extends jade.core.Agent> agentClass, java.lang.Object[] startArguments, java.lang.String inContainer)
defaultAgentName
- the agent nameagentClass
- the class of the agentstartArguments
- the start arguments for the agentinContainer
- the container name