java.lang.Object
ru.vyarus.dropwizard.guice.module.installer.feature.web.listener.SessionListenersSupport
All Implemented Interfaces:
io.dropwizard.lifecycle.Managed

public class SessionListenersSupport extends Object implements 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 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 environment
      listener - listener
    • start

      public void start() throws Exception
      Specified by:
      start in interface io.dropwizard.lifecycle.Managed
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Specified by:
      stop in interface io.dropwizard.lifecycle.Managed
      Throws:
      Exception