Interface ISimulationService

  • All Known Implementing Classes:
    SharedSimulationService

    public interface ISimulationService
    Interface for the time simulation service.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MODE_ACTION_STEP
      The execution mode action step.
      static java.lang.String MODE_NORMAL
      The execution mode normal.
      static java.lang.String MODE_TIME_STEP
      The execution mode time step.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      jadex.commons.future.IFuture<java.lang.Void> addAdvanceBlocker​(jadex.commons.future.IFuture<?> blocker)
      Adds a blocker to the clock that prevents the clock from advancing until the future is triggered either by result or exception.
      void addChangeListener​(jadex.commons.IChangeListener listener)
      Add a change listener.
      IClockService getClockService()
      Get the platform clock.
      IExecutionService getExecutorService()
      Get the executor service.
      jadex.commons.future.IFuture<java.lang.String> getMode()
      Get the execution mode.
      jadex.commons.future.IFuture<java.lang.Boolean> isExecuting()
      Test if context is executing.
      jadex.commons.future.IFuture<java.lang.Void> pause()
      Pause the execution (can be resumed via start or step).
      void removeChangeListener​(jadex.commons.IChangeListener listener)
      Remove a change listener.
      jadex.commons.future.IFuture<java.lang.Void> setClockType​(java.lang.String type)
      Set the clock type.
      jadex.commons.future.IFuture<java.lang.Void> start()
      Restart the execution after pause.
      jadex.commons.future.IFuture<java.lang.Void> stepEvent()
      Perform one event.
      jadex.commons.future.IFuture<java.lang.Void> stepTime()
      Perform all actions belonging to one time point.
    • Field Detail

      • MODE_NORMAL

        static final java.lang.String MODE_NORMAL
        The execution mode normal.
        See Also:
        Constant Field Values
      • MODE_TIME_STEP

        static final java.lang.String MODE_TIME_STEP
        The execution mode time step.
        See Also:
        Constant Field Values
      • MODE_ACTION_STEP

        static final java.lang.String MODE_ACTION_STEP
        The execution mode action step.
        See Also:
        Constant Field Values
    • Method Detail

      • pause

        jadex.commons.future.IFuture<java.lang.Void> pause()
        Pause the execution (can be resumed via start or step).
      • start

        jadex.commons.future.IFuture<java.lang.Void> start()
        Restart the execution after pause.
      • stepEvent

        jadex.commons.future.IFuture<java.lang.Void> stepEvent()
        Perform one event.
      • stepTime

        jadex.commons.future.IFuture<java.lang.Void> stepTime()
        Perform all actions belonging to one time point.
      • setClockType

        jadex.commons.future.IFuture<java.lang.Void> setClockType​(java.lang.String type)
        Set the clock type.
        Parameters:
        type - The clock type.
      • getMode

        jadex.commons.future.IFuture<java.lang.String> getMode()
        Get the execution mode.
        Returns:
        The mode.
      • isExecuting

        jadex.commons.future.IFuture<java.lang.Boolean> isExecuting()
        Test if context is executing.
      • getClockService

        IClockService getClockService()
        Get the platform clock.
        Returns:
        The clock.
      • getExecutorService

        IExecutionService getExecutorService()
        Get the executor service.
        Returns:
        The executor service.
      • addAdvanceBlocker

        jadex.commons.future.IFuture<java.lang.Void> addAdvanceBlocker​(jadex.commons.future.IFuture<?> blocker)
        Adds a blocker to the clock that prevents the clock from advancing until the future is triggered either by result or exception.
        Parameters:
        blocker - The blocking future.
        Returns:
        Null, when added.
      • addChangeListener

        void addChangeListener​(jadex.commons.IChangeListener listener)
        Add a change listener.
        Parameters:
        listener - The change listener.
      • removeChangeListener

        void removeChangeListener​(jadex.commons.IChangeListener listener)
        Remove a change listener.
        Parameters:
        listener - The change listener.