public class WebSocketServerContainerInitializer extends Object implements javax.servlet.ServletContainerInitializer
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(javax.servlet.ServletContext context,
ServletContextHandler jettyContext)
Servlet 3.1 approach.
|
void |
onStartup(Set<Class<?>> c,
javax.servlet.ServletContext context) |
public static final String ENABLE_KEY
public static ServerContainer configureContext(ServletContextHandler context) throws javax.servlet.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 handlerjavax.servlet.ServletException
- if unable to create the websocket server containerpublic static ServerContainer configureContext(javax.servlet.ServletContext context, ServletContextHandler jettyContext) throws javax.servlet.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 handlerjavax.servlet.ServletException
- if unable to create the websocket server containerCopyright © 1995-2015 Webtide. All Rights Reserved.