Class JakartaWebSocketServletContainerInitializer

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

public class JakartaWebSocketServletContainerInitializer extends Object implements jakarta.servlet.ServletContainerInitializer
  • Field Details

    • ATTR_JAKARTA_SERVER_CONTAINER

      public static final String ATTR_JAKARTA_SERVER_CONTAINER
      The ServletContext attribute key name for the ServerContainer per jakarta.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, JakartaWebSocketServletContainerInitializer.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, jakarta.servlet.ServletContext context) throws jakarta.servlet.ServletException
      Specified by:
      onStartup in interface jakarta.servlet.ServletContainerInitializer
      Throws:
      jakarta.servlet.ServletException