javax.servlet.ServletContainerInitializerpublic class NativeWebSocketServletContainerInitializer
extends java.lang.Object
implements javax.servlet.ServletContainerInitializer
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
NativeWebSocketServletContainerInitializer.Configurator |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ATTR_KEY |
| Constructor | Description |
|---|---|
NativeWebSocketServletContainerInitializer() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
configure(org.eclipse.jetty.servlet.ServletContextHandler context,
NativeWebSocketServletContainerInitializer.Configurator configurator) |
Configure the
ServletContextHandler to call the NativeWebSocketServletContainerInitializer
during the ServletContext initialization phase. |
static NativeWebSocketConfiguration |
getDefaultFrom(javax.servlet.ServletContext context) |
Deprecated.
use
configure(ServletContextHandler, Configurator) instead |
static NativeWebSocketConfiguration |
initialize(org.eclipse.jetty.servlet.ServletContextHandler context) |
Immediately initialize the
ServletContextHandler with the default NativeWebSocketConfiguration. |
void |
onStartup(java.util.Set<java.lang.Class<?>> c,
javax.servlet.ServletContext context) |
public NativeWebSocketServletContainerInitializer()
public static NativeWebSocketConfiguration initialize(org.eclipse.jetty.servlet.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(org.eclipse.jetty.servlet.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(javax.servlet.ServletContext context)
configure(ServletContextHandler, Configurator) insteadNativeWebSocketConfiguration from the ServletContextcontext - the context to work withNativeWebSocketConfigurationconfigure(ServletContextHandler, Configurator)public void onStartup(java.util.Set<java.lang.Class<?>> c,
javax.servlet.ServletContext context)
onStartup in interface javax.servlet.ServletContainerInitializerCopyright © 1995–2019 Webtide. All rights reserved.