Package jason.infra.jade
Class RunJadeMAS
java.lang.Object
javax.management.NotificationBroadcasterSupport
jason.infra.local.BaseLocalMAS
jason.infra.local.RunLocalMAS
jason.infra.jade.RunJadeMAS
- All Implemented Interfaces:
RunLocalMASMBean
,NotificationBroadcaster
,NotificationEmitter
Runs MASProject using JADE infrastructure.
This class reads the mas2j project and create the
corresponding agents.
-
Nested Class Summary
Nested classes/interfaces inherited from class jason.infra.local.RunLocalMAS
RunLocalMAS.LocalAgArchSynchronousScheduled
-
Field Summary
Fields inherited from class jason.infra.local.RunLocalMAS
createdAgents, isRunning, isRunningFinish, RMI_PREFIX_RTS, RUNNING_MAS_FILE_NAME
Fields inherited from class jason.infra.local.BaseLocalMAS
appFromClassPath, control, debug, defaultProjectFileName, dfAg, env, logPropFile, project, runner, stopMASFileName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
create()
create environment, agents, controllervoid
void
void
void
void
finish()
int
protected boolean
isFileName
(String arg) Test if an argument actually references a file.static void
protected String[]
prepareArgs
(String[] args) Transform original style boot arguments to new form.void
startAgs()
boolean
Methods inherited from class jason.infra.local.RunLocalMAS
addInitArg, changeToDebugMode, createNewReplAgButton, createPauseButton, createStopButton, enableDebugControl, finish, getDefaultLogProperties, getRunningMASFile, hasDebugControl, isRunning, killAg, parseArgs, registerInRMI, registerMBean, registerWebMindInspector, setupDefaultConsoleLogger, setupLogger, setupLogger, start, startSyncMode, stopAgs, storeRunningMASInCommonFile, waitEnd
Methods inherited from class jason.infra.local.BaseLocalMAS
addAg, delAg, dfAgExists, dfDeRegister, dfRegister, dfSearch, dfSubscribe, getAg, getAgs, getControllerInfraTier, getDF, getDFAg, getDFAgArch, getEnvironmentInfraTier, getNbAgents, getProject, getRunner, getRuntimeServices, getSubscribers, getWP, isDebug, sendProvider, setProject, setRuntimeServices
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jason.infra.local.RunLocalMASMBean
getNbAgents
-
Field Details
-
controllerName
-
environmentName
-
-
Constructor Details
-
RunJadeMAS
public RunJadeMAS()
-
-
Method Details
-
main
- Throws:
JasonException
-
init
- Overrides:
init
in classRunLocalMAS
-
create
Description copied from class:RunLocalMAS
create environment, agents, controller- Overrides:
create
in classRunLocalMAS
- Throws:
JasonException
-
createButtons
public void createButtons()- Overrides:
createButtons
in classRunLocalMAS
-
startContainer
public boolean startContainer() -
createEnvironment
- Overrides:
createEnvironment
in classRunLocalMAS
- Throws:
JasonException
-
createController
- Overrides:
createController
in classRunLocalMAS
- Throws:
JasonException
-
createAgs
- Overrides:
createAgs
in classRunLocalMAS
- Throws:
JasonException
-
startAgs
public void startAgs()- Overrides:
startAgs
in classRunLocalMAS
-
finish
public void finish()- Overrides:
finish
in classBaseLocalMAS
-
prepareArgs
Transform original style boot arguments to new form.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 list
If 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.
- Parameters:
args
- The command line arguments.
-
isFileName
Test if an argument actually references a file.- Parameters:
arg
- The argument to test.- Returns:
- True if it does, false otherwise.
-