public class WebSocketServerContainerInitializer extends Object implements ServletContainerInitializer
Modifier and Type | Class and Description |
---|---|
static class |
WebSocketServerContainerInitializer.ContextDestroyListener
DestroyListener
|
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE_KEY |
Constructor and Description |
---|
WebSocketServerContainerInitializer() |
Modifier and Type | Method and Description |
---|---|
static ServerContainer |
configureContext(ServletContextHandler context)
Jetty Native approach.
|
static ServerContainer |
configureContext(ServletContext context,
ServletContextHandler jettyContext)
Servlet 3.1 approach.
|
void |
onStartup(Set<Class<?>> c,
ServletContext context) |
public static final String ENABLE_KEY
public static ServerContainer configureContext(ServletContextHandler context) throws ServletException
Note: this will add the Upgrade filter to the existing list, with no regard for order. It will just be tacked onto the end of the list.
context
- the servlet context handlerServletException
- if unable to create the websocket server containerpublic static ServerContainer configureContext(ServletContext context, ServletContextHandler jettyContext) throws ServletException
This will use Servlet 3.1 techniques on the ServletContext
to add a filter at the start of the filter chain.
context
- the servlet contextjettyContext
- the jetty servlet context handlerServletException
- if unable to create the websocket server containerpublic void onStartup(Set<Class<?>> c, ServletContext context) throws ServletException
onStartup
in interface ServletContainerInitializer
ServletException
Copyright © 1995-2016 Webtide. All Rights Reserved.