Class ApplicationService

java.lang.Object
ortus.boxlang.runtime.services.BaseService
ortus.boxlang.runtime.services.ApplicationService
All Implemented Interfaces:
IService

public class ApplicationService extends BaseService
I handle managing Applications
  • Constructor Details

    • ApplicationService

      public ApplicationService(BoxRuntime runtime)
      Constructor
      Parameters:
      runtime - The runtime instance
  • Method Details

    • getApplication

      public Application getApplication(Key name)
      Get an application by name, creating if neccessary
      Parameters:
      name - The name of the application
      Returns:
      The application
    • removeApplication

      public void removeApplication(Key name)
      Terminates an application by name
      Parameters:
      name - The name of the application
    • shutdownApplication

      public void shutdownApplication(Key name)
      Shuts down an application by name and removes it
      Parameters:
      name - The name of the application
    • hasApplication

      public boolean hasApplication(Key name)
      Check if an application exists
      Parameters:
      name - The name of the application
      Returns:
      True if the application exists
    • getApplicationNames

      public String[] getApplicationNames()
      Get the names of all registered applications
      Returns:
      The names of all applications
    • onConfigurationLoad

      public void onConfigurationLoad()
      The configuration load event is fired when the runtime loads the configuration
      Specified by:
      onConfigurationLoad in interface IService
      Specified by:
      onConfigurationLoad in class BaseService
    • onStartup

      public void onStartup()
      The startup event is fired when the runtime starts up
      Specified by:
      onStartup in interface IService
      Specified by:
      onStartup in class BaseService
    • onShutdown

      public void onShutdown(Boolean force)
      The shutdown event is fired when the runtime shuts down
      Specified by:
      onShutdown in interface IService
      Specified by:
      onShutdown in class BaseService
      Parameters:
      force - If true, forces the shutdown of the scheduler
    • createApplicationListener

      public BaseApplicationListener createApplicationListener(RequestBoxContext context, URI template)
      Create an ApplicationListener based on the template path
      Parameters:
      context - The request context requesting the application
      template - The template path to search for an Application descriptor
      Returns:
      The ApplicationListener in the template path or a new one if not found