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
FieldsFields inherited from class jason.infra.local.RunLocalMAS
createdAgents, isRunning, isRunningFinish, RMI_PREFIX_RTS, RUNNING_MAS_FILE_NAMEFields inherited from class jason.infra.local.BaseLocalMAS
appFromClassPath, control, debug, defaultProjectFileName, dfAg, env, logPropFile, project, runner, stopMASFileName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()create environment, agents, controllervoidvoidvoidvoidvoidfinish()intprotected booleanisFileName(String arg) Test if an argument actually references a file.static voidprotected String[]prepareArgs(String[] args) Transform original style boot arguments to new form.voidstartAgs()booleanMethods 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, waitEndMethods 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, setRuntimeServicesMethods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jason.infra.local.RunLocalMASMBean
getNbAgents
-
Field Details
-
controllerName
-
environmentName
-
-
Constructor Details
-
RunJadeMAS
public RunJadeMAS()
-
-
Method Details
-
main
- Throws:
JasonException
-
init
- Overrides:
initin classRunLocalMAS
-
create
Description copied from class:RunLocalMAScreate environment, agents, controller- Overrides:
createin classRunLocalMAS- Throws:
JasonException
-
createButtons
public void createButtons()- Overrides:
createButtonsin classRunLocalMAS
-
startContainer
public boolean startContainer() -
createEnvironment
- Overrides:
createEnvironmentin classRunLocalMAS- Throws:
JasonException
-
createController
- Overrides:
createControllerin classRunLocalMAS- Throws:
JasonException
-
createAgs
- Overrides:
createAgsin classRunLocalMAS- Throws:
JasonException
-
startAgs
public void startAgs()- Overrides:
startAgsin classRunLocalMAS
-
finish
public void finish()- Overrides:
finishin 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.
-