Package ortus.boxlang.runtime.services
Class BaseService
java.lang.Object
ortus.boxlang.runtime.services.BaseService
- All Implemented Interfaces:
IService
- Direct Known Subclasses:
ApplicationService,AsyncService,CacheService,ComponentService,DatasourceService,FunctionService,ModuleService,SchedulerService
A base service class that all services should extend.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseService(BoxRuntime runtime, Key name) Runtime Service Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAnnounce an event with no data.voidAnnounce an event with the providedIStructof data.voidAnnounce an event with no data.voidAnnounce an event with the providedIStructof data.getName()Get the service nameGet the runtime singletonGet the timer utility classabstract voidThe configuration load event is fired when the runtime loads the configurationabstract voidonShutdown(Boolean force) The shutdown event is fired when the runtime shuts downabstract voidThe startup event is fired when the runtime starts up
-
Field Details
-
timerUtil
The timer utility class -
runtime
The runtime singleton link -
name
The service name
-
-
Constructor Details
-
BaseService
Runtime Service Constructor- Parameters:
runtime- The runtime singleton
-
-
Method Details
-
getTimerUtil
Get the timer utility class- Returns:
- The timer utility class
-
getRuntime
Get the runtime singleton- Returns:
- The runtime
-
getName
Get the service name -
onConfigurationLoad
public abstract void onConfigurationLoad()The configuration load event is fired when the runtime loads the configuration- Specified by:
onConfigurationLoadin interfaceIService
-
onStartup
public abstract void onStartup()The startup event is fired when the runtime starts up -
onShutdown
The shutdown event is fired when the runtime shuts down- Specified by:
onShutdownin interfaceIService- Parameters:
force- Whether the shutdown is forced
-
announce
Announce an event with the providedIStructof data.- Parameters:
state- The state key to announcedata- The data to announce
-
announce
Announce an event with the providedIStructof data.- Parameters:
state- The state key to announcedata- The data to announce
-
announce
Announce an event with no data.- Parameters:
state- The state key to announce
-
announce
Announce an event with no data.- Parameters:
state- The state key to announce
-