Class RunLocalMAS

java.lang.Object
javax.management.NotificationBroadcasterSupport
jason.infra.local.BaseLocalMAS
jason.infra.local.RunLocalMAS
All Implemented Interfaces:
RunLocalMASMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
Direct Known Subclasses:
RunCentralisedMAS, RunJadeMAS

public class RunLocalMAS
extends BaseLocalMAS
implements RunLocalMASMBean
Runs MASProject using Local infrastructure.
  • Field Details

    • btDebug

      private javax.swing.JButton btDebug
    • isRunning

      protected boolean isRunning
    • createdAgents

      protected java.util.List<LocalAgArch> createdAgents
    • sleepingAgs

      private java.util.Set<LocalAgArch> sleepingAgs
    • executor

      private java.util.concurrent.ExecutorService executor
    • executorSense

      private java.util.concurrent.ExecutorService executorSense
    • executorDeliberate

      private java.util.concurrent.ExecutorService executorDeliberate
    • executorAct

      private java.util.concurrent.ExecutorService executorAct
    • isRunningFinish

      protected java.util.concurrent.atomic.AtomicBoolean isRunningFinish
  • Constructor Details

    • RunLocalMAS

      public RunLocalMAS()
  • Method Details

    • hasDebugControl

      public boolean hasDebugControl()
      Specified by:
      hasDebugControl in class BaseLocalMAS
    • enableDebugControl

      public void enableDebugControl()
      Specified by:
      enableDebugControl in class BaseLocalMAS
    • main

      public static void main​(java.lang.String[] args) throws JasonException
      Throws:
      JasonException
    • registerMBean

      protected void registerMBean()
    • init

      protected int init​(java.lang.String[] args)
    • parseArgs

      protected java.util.Map<java.lang.String,​java.lang.Object> parseArgs​(java.lang.String[] args)
    • create

      protected void create() throws JasonException
      create environment, agents, controller
      Throws:
      JasonException
    • start

      protected void start()
      start agents, ....
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in class BaseLocalMAS
    • setupLogger

      public void setupLogger()
      Specified by:
      setupLogger in class BaseLocalMAS
    • setupLogger

      public void setupLogger​(java.lang.String confFile)
    • getDefaultLogProperties

      protected java.io.InputStream getDefaultLogProperties() throws java.io.IOException
      Throws:
      java.io.IOException
    • setupDefaultConsoleLogger

      protected void setupDefaultConsoleLogger()
    • createButtons

      protected void createButtons()
    • createPauseButton

      protected void createPauseButton()
    • createStopButton

      protected void createStopButton()
    • createNewReplAgButton

      protected void createNewReplAgButton()
    • createReplAg

      protected void createReplAg​(java.lang.String n)
    • createEnvironment

      protected void createEnvironment() throws JasonException
      Throws:
      JasonException
    • createAgs

      protected void createAgs() throws JasonException
      Throws:
      JasonException
    • createController

      protected void createController() throws JasonException
      Throws:
      JasonException
    • startAgs

      protected void startAgs()
    • createAgsThreads

      private void createAgsThreads()
      creates one thread per agent
    • createThreadPool

      private void createThreadPool()
      creates a pool of threads shared by all agents
    • stopAgs

      protected void stopAgs​(int deadline)
    • killAg

      public boolean killAg​(java.lang.String agName)
      Specified by:
      killAg in interface RunLocalMASMBean
    • changeToDebugMode

      protected void changeToDebugMode()
      change the current running MAS to debug mode
    • startSyncMode

      protected void startSyncMode()
    • waitEnd

      protected void waitEnd()
    • finish

      public void finish​(int deadline, boolean stopJVM, int exitValue)
      Specified by:
      finish in interface RunLocalMASMBean
      Specified by:
      finish in class BaseLocalMAS
    • showProjectSources

      private static void showProjectSources​(MAS2JProject project)
      show the sources of the project