public class RunCentralisedMAS extends BaseCentralisedMAS implements RunCentralisedMASMBean
Modifier and Type | Class and Description |
---|---|
protected class |
RunCentralisedMAS.CentralisedAgArchSynchronousScheduled
an agent architecture for the infra based on thread pool
|
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
btDebug |
private java.util.concurrent.ExecutorService |
executor |
private java.util.concurrent.ExecutorService |
executorAct |
private java.util.concurrent.ExecutorService |
executorDeliberate |
private java.util.concurrent.ExecutorService |
executorSense |
private java.lang.Boolean |
runningFinish |
private java.util.Set<CentralisedAgArch> |
sleepingAgs |
ags, control, debug, defaultProjectFileName, env, logger, logPropFile, project, readFromJAR, runner, stopMASFileName, urlPrefix
Constructor and Description |
---|
RunCentralisedMAS() |
Modifier and Type | Method and Description |
---|---|
protected void |
changeToDebugMode()
change the current running MAS to debug mode
|
protected void |
create()
create environment, agents, controller
|
protected void |
createAgs() |
private void |
createAgsThreads()
creates one thread per agent
|
protected void |
createButtons() |
protected void |
createController() |
protected void |
createEnvironment() |
protected void |
createNewReplAgButton() |
protected void |
createPauseButton() |
protected void |
createReplAg(java.lang.String n) |
protected void |
createStopButton() |
private void |
createThreadPool()
creates a pool of threads shared by all agents
|
void |
enableDebugControl() |
void |
finish() |
protected java.io.InputStream |
getDefaultLogProperties() |
boolean |
hasDebugControl() |
protected int |
init(java.lang.String[] args) |
boolean |
killAg(java.lang.String agName) |
static void |
main(java.lang.String[] args) |
protected void |
registerMBean() |
protected void |
setupDefaultConsoleLogger() |
void |
setupLogger() |
private static void |
showProjectSources(MAS2JProject project)
show the sources of the project
|
protected void |
start()
start agents, ....
|
protected void |
startAgs() |
protected void |
startSyncMode() |
protected void |
stopAgs() |
protected void |
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
private javax.swing.JButton btDebug
private java.util.Set<CentralisedAgArch> sleepingAgs
private java.util.concurrent.ExecutorService executor
private java.util.concurrent.ExecutorService executorSense
private java.util.concurrent.ExecutorService executorDeliberate
private java.util.concurrent.ExecutorService executorAct
private java.lang.Boolean runningFinish
public boolean hasDebugControl()
hasDebugControl
in class BaseCentralisedMAS
public void enableDebugControl()
enableDebugControl
in class BaseCentralisedMAS
public static void main(java.lang.String[] args) throws JasonException
JasonException
protected void registerMBean()
protected int init(java.lang.String[] args)
protected void create() throws JasonException
JasonException
protected void start()
public void setupLogger()
setupLogger
in class BaseCentralisedMAS
protected java.io.InputStream getDefaultLogProperties() throws java.io.IOException
java.io.IOException
protected void setupDefaultConsoleLogger()
protected void createButtons()
protected void createPauseButton()
protected void createStopButton()
protected void createNewReplAgButton()
protected void createReplAg(java.lang.String n)
protected void createEnvironment() throws JasonException
JasonException
protected void createAgs() throws JasonException
JasonException
protected void createController() throws JasonException
JasonException
protected void startAgs()
private void createAgsThreads()
private void createThreadPool()
protected void stopAgs()
public boolean killAg(java.lang.String agName)
killAg
in interface RunCentralisedMASMBean
protected void changeToDebugMode()
protected void startSyncMode()
protected void waitEnd()
public void finish()
finish
in interface RunCentralisedMASMBean
finish
in class BaseCentralisedMAS
private static void showProjectSources(MAS2JProject project)