Interface ImmediateController

All Known Implementing Classes:
ImmediateHelper

@Contract public interface ImmediateController
This service is advertised when the Immediate service is put into the registry. The immediate service by default starts in the SUSPENDED state so that the Executor and other parameters can be set prior to the first Immediate service being started
  • Method Details

    • getExecutor

      Executor getExecutor()
      Returns the executor that is currently in use by the Immediate subsystem
      Returns:
      The current executor in use by the controller. Will not return null since a default executor is used and returned by this call even if setExecutor is called with null
    • setExecutor

      void setExecutor(Executor executor) throws IllegalStateException
      Sets the executor to be used by the Immediate subsystem. If set to null a default executor will be used. This may only be called when the Immediate service is suspended
      Parameters:
      executor - The executor to be used when scheduling work. If null a default executor implementation will be used
      Throws:
      IllegalStateException - if this is called when the Immediate service is not in suspended state
    • getThreadInactivityTimeout

      long getThreadInactivityTimeout()
      Returns the time in milliseconds a thread will wait for new Immediate services before dying
      Returns:
      The time in milliseconds a thread will wait for new Immediate service before dying
    • setThreadInactivityTimeout

      void setThreadInactivityTimeout(long timeInMillis) throws IllegalArgumentException
      Sets the time in milliseconds a thread will wait for new Immediate services before dying
      Parameters:
      timeInMillis - The time in milliseconds a thread will wait for new Immediate service before dying
      Throws:
      IllegalArgumentException - if timeInMillis is less than zero
    • getImmediateState

      Returns the state the system is currently running under
      Returns:
      The current state of the ImmediateService
    • setImmediateState

      void setImmediateState(ImmediateController.ImmediateServiceState state)
      Sets the state the system is currently running under
      Parameters:
      state - The new state of the ImmediateService