public class NativeWebSocketServletContainerInitializer extends Object implements ServletContainerInitializer
| Modifier and Type | Class and Description |
|---|---|
static interface |
NativeWebSocketServletContainerInitializer.Configurator |
| Constructor and Description |
|---|
NativeWebSocketServletContainerInitializer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(ServletContextHandler context,
NativeWebSocketServletContainerInitializer.Configurator configurator)
Configure the
ServletContextHandler to call the NativeWebSocketServletContainerInitializer
during the ServletContext initialization phase. |
static NativeWebSocketConfiguration |
getDefaultFrom(ServletContext context)
Deprecated.
use
configure(ServletContextHandler, Configurator) instead |
static NativeWebSocketConfiguration |
initialize(ServletContextHandler context)
Immediately initialize the
ServletContextHandler with the default NativeWebSocketConfiguration. |
void |
onStartup(Set<Class<?>> c,
ServletContext context) |
public static final String ATTR_KEY
public NativeWebSocketServletContainerInitializer()
public static NativeWebSocketConfiguration initialize(ServletContextHandler context)
ServletContextHandler with the default NativeWebSocketConfiguration.
This method is typically called from onStartup(Set, ServletContext) itself or from
another dependent ServletContainerInitializer that requires minimal setup to
be performed.
This method SHOULD NOT BE CALLED by users of Jetty.
Use the configure(ServletContextHandler, Configurator) method instead.
This will return the default NativeWebSocketConfiguration if already initialized,
and not create a new NativeWebSocketConfiguration each time it is called.
context - the context to work withNativeWebSocketConfigurationpublic static void configure(ServletContextHandler context, NativeWebSocketServletContainerInitializer.Configurator configurator)
ServletContextHandler to call the NativeWebSocketServletContainerInitializer
during the ServletContext initialization phase.context - the context to add listener to.configurator - a lambda that is called to allow the NativeWebSocketConfiguration to
be configured during ServletContext initialization phase@Deprecated public static NativeWebSocketConfiguration getDefaultFrom(ServletContext context)
configure(ServletContextHandler, Configurator) insteadNativeWebSocketConfiguration from the ServletContextcontext - the context to work withNativeWebSocketConfigurationconfigure(ServletContextHandler, Configurator)public void onStartup(Set<Class<?>> c, ServletContext context)
onStartup in interface ServletContainerInitializerCopyright © 2010 - 2020 Adobe. All Rights Reserved