Package org.faceless.publisher.web
Class ServiceEngineServletContextListener
java.lang.Object
org.faceless.publisher.web.ServiceEngineServletContextListener
This the glue that manages a ServiceEngine over the lifetime of a ServletContext.
If we're running a Standalone webserver, one of these is created manually, with a
ServiceEngine supplied a the constructor. It's presumed that ServiceEngine is
already configured.
And if this is running in a larger web server it's created by virtue of it being
a @WebListener - no ServiceEngine is supplied. In this case it looks in
WEB-INF/service-engine.json for the configuration file.
In theory it could then listen for changes to the ServiceEngine and act on those,
ie if the paths change. This is not yet implemented.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor called from larger webserver - we create an engine for the context, and destroy it laterConstructor called from embedded webserver - we have one engine, once. -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextDestroyed
(ServletContextEvent e) void
contextInitialized
(ServletContextEvent event) void
requestDestroyed
(ServletRequestEvent e) void
requestInitialized
(ServletRequestEvent e)
-
Constructor Details
-
ServiceEngineServletContextListener
Constructor called from embedded webserver - we have one engine, once. -
ServiceEngineServletContextListener
public ServiceEngineServletContextListener()Constructor called from larger webserver - we create an engine for the context, and destroy it later
-
-
Method Details
-
contextInitialized
public void contextInitialized(ServletContextEvent event) -
contextDestroyed
public void contextDestroyed(ServletContextEvent e) -
requestInitialized
public void requestInitialized(ServletRequestEvent e) -
requestDestroyed
public void requestDestroyed(ServletRequestEvent e)
-