Package ortus.boxlang.runtime.services
Class ApplicationService
java.lang.Object
ortus.boxlang.runtime.services.BaseService
ortus.boxlang.runtime.services.ApplicationService
- All Implemented Interfaces:
IService
I handle managing Applications
-
Field Summary
Fields inherited from class ortus.boxlang.runtime.services.BaseService
name, runtime, timerUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateApplicationListener(RequestBoxContext context, URI template) Create an ApplicationListener based on the template pathgetApplication(Key name) Get an application by name, creating if neccessaryString[]Get the names of all registered applicationsbooleanhasApplication(Key name) Check if an application existsvoidThe configuration load event is fired when the runtime loads the configurationvoidonShutdown(Boolean force) The shutdown event is fired when the runtime shuts downvoidThe startup event is fired when the runtime starts upvoidremoveApplication(Key name) Terminates an application by namevoidshutdownApplication(Key name) Shuts down an application by name and removes itMethods inherited from class ortus.boxlang.runtime.services.BaseService
announce, announce, announce, announce, getName, getRuntime, getTimerUtil
-
Constructor Details
-
ApplicationService
Constructor- Parameters:
runtime- The runtime instance
-
-
Method Details
-
getApplication
Get an application by name, creating if neccessary- Parameters:
name- The name of the application- Returns:
- The application
-
removeApplication
Terminates an application by name- Parameters:
name- The name of the application
-
shutdownApplication
Shuts down an application by name and removes it- Parameters:
name- The name of the application
-
hasApplication
Check if an application exists- Parameters:
name- The name of the application- Returns:
- True if the application exists
-
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:
onConfigurationLoadin interfaceIService- Specified by:
onConfigurationLoadin classBaseService
-
onStartup
public void onStartup()The startup event is fired when the runtime starts up- Specified by:
onStartupin interfaceIService- Specified by:
onStartupin classBaseService
-
onShutdown
The shutdown event is fired when the runtime shuts down- Specified by:
onShutdownin interfaceIService- Specified by:
onShutdownin classBaseService- Parameters:
force- If true, forces the shutdown of the scheduler
-
createApplicationListener
Create an ApplicationListener based on the template path- Parameters:
context- The request context requesting the applicationtemplate- The template path to search for an Application descriptor- Returns:
- The ApplicationListener in the template path or a new one if not found
-