public class RunJadeMAS extends RunCentralisedMAS
RunCentralisedMAS.CentralisedAgArchSynchronousScheduled
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,jade.wrapper.AgentController> |
ags |
private jade.wrapper.ContainerController |
cc |
static java.lang.String |
controllerName |
private jade.wrapper.AgentController |
crtc |
private jade.wrapper.AgentController |
envc |
static java.lang.String |
environmentName |
private java.util.ArrayList<java.lang.String> |
initArgs |
private static java.util.logging.Logger |
logger |
private jade.core.ProfileImpl |
profile |
private java.lang.String |
targetContainer |
control, debug, defaultProjectFileName, env, logPropFile, project, readFromJAR, runner, stopMASFileName, urlPrefix
Constructor and Description |
---|
RunJadeMAS() |
Modifier and Type | Method and Description |
---|---|
void |
addInitArgs(java.lang.String[] args) |
void |
create()
create environment, agents, controller
|
void |
createAgs() |
void |
createButtons() |
void |
createController() |
void |
createEnvironment() |
void |
finish() |
int |
init(java.lang.String[] args) |
protected boolean |
isFileName(java.lang.String arg)
Test if an argument actually references a file.
|
static void |
main(java.lang.String[] args) |
protected java.lang.String[] |
prepareArgs(java.lang.String[] args)
Transform original style boot arguments to new form.
|
void |
startAgs() |
boolean |
startContainer() |
changeToDebugMode, createNewReplAgButton, createPauseButton, createReplAg, createStopButton, enableDebugControl, getDefaultLogProperties, hasDebugControl, killAg, registerMBean, setupDefaultConsoleLogger, setupLogger, start, startSyncMode, stopAgs, waitEnd
addAg, delAg, getAg, getAgs, getControllerInfraTier, getEnvironmentInfraTier, getNbAgents, getProject, getRunner, getRuntimeServices, isDebug, setProject
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNbAgents
public static java.lang.String controllerName
public static java.lang.String environmentName
private static java.util.logging.Logger logger
private jade.wrapper.AgentController envc
private jade.wrapper.AgentController crtc
private java.util.Map<java.lang.String,jade.wrapper.AgentController> ags
private jade.wrapper.ContainerController cc
private java.lang.String targetContainer
private java.util.ArrayList<java.lang.String> initArgs
private jade.core.ProfileImpl profile
public static void main(java.lang.String[] args) throws JasonException
JasonException
public int init(java.lang.String[] args)
init
in class RunCentralisedMAS
public void create() throws JasonException
RunCentralisedMAS
create
in class RunCentralisedMAS
JasonException
public void addInitArgs(java.lang.String[] args)
public void createButtons()
createButtons
in class RunCentralisedMAS
public boolean startContainer()
public void createEnvironment() throws JasonException
createEnvironment
in class RunCentralisedMAS
JasonException
public void createController() throws JasonException
createController
in class RunCentralisedMAS
JasonException
public void createAgs() throws JasonException
createAgs
in class RunCentralisedMAS
JasonException
public void startAgs()
startAgs
in class RunCentralisedMAS
public void finish()
finish
in interface RunCentralisedMASMBean
finish
in class RunCentralisedMAS
protected java.lang.String[] prepareArgs(java.lang.String[] args)
In the following 'x' and 'y' denote arbitrary strings; 'n' an integer. Transformation Rules: Original New ------------------------------ -host x host:x -owner x owner:x -name x name:x -port n port:n -mtp x mtp:x -aclcodec:x aclcodec:x -conf x import:x -conf -conf -container -container -gui -gui -version -version -v -version -help -help -h -help -nomtp -nomtp -nomobility -nomobility -y x y:x agent list agents:agent listIf the arguments contain either import:x or agents:x we will assume that the arguments are already in the new format and leave them alone. For "import:" we test if what follows is a file name and in the event it isn't we assume that it was if there are any other "-x" options following.
You can't mix the old form with the new as this would make the distinction between foo:bar as meaning a property named foo with a value bar or an agent named foo implmented by class bar impossible.
args
- The command line arguments.protected boolean isFileName(java.lang.String arg)
arg
- The argument to test.