Package jason.infra.local
Class RunLocalMAS
java.lang.Object
javax.management.NotificationBroadcasterSupport
jason.infra.local.BaseLocalMAS
jason.infra.local.RunLocalMAS
- All Implemented Interfaces:
RunLocalMASMBean,NotificationBroadcaster,NotificationEmitter
- Direct Known Subclasses:
RunJadeMAS
Runs MASProject using *Local* infrastructure.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected final classan agent architecture for the infra based on thread pool -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<LocalAgArch> protected booleanprotected AtomicBooleanprotected static Loggerstatic final Stringstatic final StringFields inherited from class jason.infra.local.BaseLocalMAS
ags, appFromClassPath, control, debug, defaultProjectFileName, dfAg, env, logPropFile, project, runner, stopMASFileName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInitArg(String k, Object v) protected voidchange the current running MAS to debug modevoidcreate()create environment, agents, controllerprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidvoidfinish(int deadline, boolean stopJVM, int exitValue) protected InputStreamstatic Filebooleanintbooleanbooleanstatic voidprotected voidprotected voidprotected voidprotected voidprotected voidvoidvoidsetupLogger(String confFile) voidstart()start agents, ....protected voidstartAgs()protected voidprotected voidstopAgs(int deadline) voidstoreRunningMASInCommonFile(String masName, String address) voidwaitEnd()Methods inherited from class jason.infra.local.BaseLocalMAS
addAg, delAg, dfAgExists, dfDeRegister, dfRegister, dfSearch, dfSubscribe, finish, 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
-
logger
-
isRunning
protected boolean isRunning -
createdAgents
-
initArgs
-
RMI_PREFIX_RTS
- See Also:
-
RUNNING_MAS_FILE_NAME
- See Also:
-
isRunningFinish
-
-
Constructor Details
-
RunLocalMAS
public RunLocalMAS()
-
-
Method Details
-
hasDebugControl
public boolean hasDebugControl()- Specified by:
hasDebugControlin classBaseLocalMAS
-
enableDebugControl
public void enableDebugControl()- Specified by:
enableDebugControlin classBaseLocalMAS
-
main
- Throws:
JasonException
-
registerMBean
protected void registerMBean() -
registerWebMindInspector
protected void registerWebMindInspector() -
addInitArg
-
init
-
parseArgs
-
registerInRMI
protected void registerInRMI() -
getRunningMASFile
-
storeRunningMASInCommonFile
-
create
create environment, agents, controller- Throws:
JasonException
-
start
public void start()start agents, .... -
isRunning
public boolean isRunning()- Specified by:
isRunningin classBaseLocalMAS
-
setupLogger
public void setupLogger()- Specified by:
setupLoggerin classBaseLocalMAS
-
setupLogger
-
getDefaultLogProperties
- Throws:
IOException
-
setupDefaultConsoleLogger
protected void setupDefaultConsoleLogger() -
createButtons
protected void createButtons() -
createPauseButton
protected void createPauseButton() -
createStopButton
protected void createStopButton() -
createNewReplAgButton
protected void createNewReplAgButton() -
createEnvironment
- Throws:
JasonException
-
createAgs
- Throws:
JasonException
-
createController
- Throws:
JasonException
-
startAgs
protected void startAgs() -
stopAgs
protected void stopAgs(int deadline) -
killAg
- Specified by:
killAgin interfaceRunLocalMASMBean
-
changeToDebugMode
protected void changeToDebugMode()change the current running MAS to debug mode -
startSyncMode
protected void startSyncMode() -
waitEnd
public void waitEnd() -
finish
public void finish(int deadline, boolean stopJVM, int exitValue) - Specified by:
finishin interfaceRunLocalMASMBean- Specified by:
finishin classBaseLocalMAS
-