public abstract class ModuleRegistrationListener extends Object implements ServletContextListener, ModuleRegistration
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.
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(ServletContextEvent anEvent)
Receives a notification that the web application servlet context event
is about to be destroyed.
|
void |
contextInitialized(ServletContextEvent anEvent)
Receives a notification that the web application servlet context event
is about to be initialized.
|
void |
handleContextInitialized(ModuleInitializedContext aContext)
Handles the registration of dynamic resources and performs
module-specific initializations.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroyBeforeUnregisterModule, handleRepositoryShutdown, handleRepositoryStartup, handleServiceRegistration
public void handleContextInitialized(ModuleInitializedContext aContext)
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.
aContext
- the module's initialized context generated
after the module's registration.public final void contextInitialized(ServletContextEvent anEvent) throws ModuleDefinitionException
This 'final' implementation registers the EBX® module to the modules registry.
contextInitialized
in interface ServletContextListener
anEvent
- event class for notifications about changes to
the servlet context of a web applicationModuleDefinitionException
- if the module cannot be registered properlypublic final void contextDestroyed(ServletContextEvent anEvent)
This 'final' implementation:
ModuleRegistration.destroyBeforeUnregisterModule()
contextDestroyed
in interface ServletContextListener