Class JavaxWebSocketServletContainerInitializer

java.lang.Object
org.eclipse.jetty.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer
All Implemented Interfaces:
javax.servlet.ServletContainerInitializer

public class JavaxWebSocketServletContainerInitializer extends Object implements javax.servlet.ServletContainerInitializer
  • Field Details

    • ATTR_JAVAX_SERVER_CONTAINER

      public static final String ATTR_JAVAX_SERVER_CONTAINER
      The ServletContext attribute key name for the ServerContainer per javax.websocket spec 1.0 final section 6.4 Programmatic Server Deployment
    • ENABLE_KEY

      public static final String ENABLE_KEY
      See Also:
    • HTTPCLIENT_ATTRIBUTE

      public static final String HTTPCLIENT_ATTRIBUTE
      See Also:
  • Constructor Details

  • Method Details

    • configure

      public static void configure(ServletContextHandler context, JavaxWebSocketServletContainerInitializer.Configurator configurator)
      Configure the ServletContextHandler to call onStartup(Set, ServletContext) during the ServletContext initialization phase.
      Parameters:
      context - the context to add listener to
      configurator - the lambda that is called to allow the ServerContainer to be configured during the ServletContext initialization phase
    • onStartup

      public void onStartup(Set<Class<?>> c, javax.servlet.ServletContext context) throws javax.servlet.ServletException
      Specified by:
      onStartup in interface javax.servlet.ServletContainerInitializer
      Throws:
      javax.servlet.ServletException