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 voidcontextDestroyed(ServletContextEvent anEvent) Receives a notification that the web application servlet context event is about to be destroyed.final voidcontextInitialized(ServletContextEvent anEvent) Receives a notification that the web application servlet context event is about to be initialized.voidHandles 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, waitMethods 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:
contextInitializedin 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:
contextDestroyedin interfaceServletContextListener
- invokes the method
-