Class SessionListenersSupport
java.lang.Object
ru.vyarus.dropwizard.guice.module.installer.feature.web.listener.SessionListenersSupport
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed
Session listeners can't be registered immediately in installer, because it will execute before
application run method and so session will not be configured. Class used as session listeners holder
and register them later using managed lifecycle.
- Since:
- 08.08.2016
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(io.dropwizard.jetty.MutableServletContextHandler environment, EventListener listener) Add listener for delayed registration.voidstart()voidstop()
-
Constructor Details
-
SessionListenersSupport
public SessionListenersSupport(boolean failWithoutSession) Create support.- Parameters:
failWithoutSession- true to fail without session handler
-
-
Method Details
-
add
public void add(io.dropwizard.jetty.MutableServletContextHandler environment, EventListener listener) Add listener for delayed registration.- Parameters:
environment- servlet environmentlistener- listener
-
start
- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-
stop
- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-