Package ortus.boxlang.runtime.services
Class InterceptorService
java.lang.Object
ortus.boxlang.runtime.events.InterceptorPool
ortus.boxlang.runtime.services.InterceptorService
- All Implemented Interfaces:
IService
The interceptor service is responsible for managing all events in BoxLang.
A developer will register an interceptor with the service, and the service will
invoke the interceptor when the event is fired.
The interceptor service is a singleton.
Each service manages interception points, which are the events that the service can announce
and their states, which are where interceptors can register to listen to.
-
Field Summary
Fields inherited from class ortus.boxlang.runtime.events.InterceptorPool
interceptionPoints, interceptionStates, keyRegistry, name, runtime
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onShutdown
(Boolean force) The shutdown event is fired when the runtime shuts downvoid
The startup event is fired when the runtime starts upMethods inherited from class ortus.boxlang.runtime.events.InterceptorPool
announce, announce, announce, announce, announce, announce, announceAsync, announceAsync, announceAsync, announceAsync, announceAsync, announceAsync, clearInterceptionStates, getInterceptionPoints, getInterceptionPointsNames, getInterceptionStates, getName, getState, hasInterceptionPoint, hasState, newAndRegister, register, register, register, register, register, registerInterceptionPoint, registerState, removeInterceptionPoint, removeState, unregister, unregister
-
Constructor Details
-
InterceptorService
Get an instance of the service- Parameters:
runtime
- The runtime singleton
-
-
Method Details
-
onStartup
public 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:
onShutdown
in interfaceIService
- Parameters:
force
- True if the shutdown is forced, false otherwise
-