Package com.orchestranetworks.module
Class ModuleRegistrationListener
java.lang.Object
com.orchestranetworks.module.ModuleRegistrationListener
- All Implemented Interfaces:
ModuleRegistration
,ServletContextListener
,EventListener
public abstract class ModuleRegistrationListener
extends Object
implements ServletContextListener, ModuleRegistration
Ensures the EBX® module registration from a servlet context listener.
This abstract class implements ServletContextListener
, then the implementation
class must be annotated with WebListener
in order
to receive the ModuleRegistration
's handle methods.
If further initialization or termination is required,
see ModuleRegistration
for more information.
- Since:
- 5.9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
contextDestroyed
(ServletContextEvent anEvent) Receives a notification that the web application servlet context event is about to be destroyed.final void
contextInitialized
(ServletContextEvent anEvent) Receives a notification that the web application servlet context event is about to be initialized.void
Handles the registration of dynamic resources and performs module-specific initializations.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.orchestranetworks.module.ModuleRegistration
destroyBeforeUnregisterModule, handleRepositoryShutdown, handleRepositoryStartup, handleSearchRegistration, handleServiceRegistration
-
Method Details
-
handleContextInitialized
Handles the registration of dynamic resources and performs module-specific initializations.It is invoked once the EBX® module has been registered, before the repository has been started.
This method can be overridden.
Default implementation does nothing.
- Parameters:
aContext
- the module's initialized context generated after the module's registration.
-
contextInitialized
Receives a notification that the web application servlet context event is about to be initialized.This 'final' implementation registers the EBX® module to the modules registry.
- Specified by:
contextInitialized
in interfaceServletContextListener
- Parameters:
anEvent
- event class for notifications about changes to the servlet context of a web application- Throws:
ModuleDefinitionException
- if the module cannot be registered properly
-
contextDestroyed
Receives a notification that the web application servlet context event is about to be destroyed.This 'final' implementation:
- invokes the method
ModuleRegistration.destroyBeforeUnregisterModule()
- unregisters the EBX® module from the modules registry.
- Specified by:
contextDestroyed
in interfaceServletContextListener
- invokes the method
-