Class ApplicationManager

java.lang.Object
com.xebisco.yield.manager.ApplicationManager
All Implemented Interfaces:
Runnable

public class ApplicationManager extends Object implements Runnable
ApplicationManager class manages the lifecycle of applications. It runs the applications and handles their disposal when necessary.
  • Constructor Details

    • ApplicationManager

      public ApplicationManager(ContextTime contextTime)
      Constructs an instance of ApplicationManager with the specified context time.
      Parameters:
      contextTime - The context time for the manager.
  • Method Details

    • run

      public void run()
      Starts the thread for the manager. It starts all the Applications in this ApplicationManager.
      Specified by:
      run in interface Runnable
    • applications

      public List<Application> applications()
      Returns the list of applications managed by this manager.
      Returns:
      The list of applications.
    • setApplications

      public ApplicationManager setApplications(List<Application> applications)
      Sets the list of applications managed by this manager.
      Parameters:
      applications - The list of applications.
      Returns:
      This instance of ApplicationManager for method chaining.
    • managerContext

      public Context managerContext()
      Returns the context in which this manager operates.
      Returns:
      The context.
    • setManagerContext

      public ApplicationManager setManagerContext(Context managerContext)
      Sets the context in which this manager operates.
      Parameters:
      managerContext - The context.
      Returns:
      This instance of ApplicationManager for method chaining.
    • disposeWhenEmpty

      public boolean disposeWhenEmpty()
      Returns the flag indicating whether to dispose of the manager when there are no more applications.
      Returns:
      The flag.
    • setDisposeWhenEmpty

      public ApplicationManager setDisposeWhenEmpty(boolean disposeWhenEmpty)
      Sets the flag indicating whether to dispose of the manager when there are no more applications.
      Parameters:
      disposeWhenEmpty - The flag.
      Returns:
      This instance of ApplicationManager for method chaining.