public class WebSocketConfiguration extends AbstractConfiguration
This configuration will configure a context for JSR356 Websockets.
It is possible to disable specific contexts with an attribute "org.eclipse.jetty.websocket.jsr356"
(set to "false"
)
This attribute may be set on an individual context, or on the server to affect all deployed contexts.
Configuration.ClassList
Modifier and Type | Field and Description |
---|---|
static String |
ENABLE |
ATTR
Constructor and Description |
---|
WebSocketConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
configure(WebAppContext context)
Configure WebApp.
|
static ServerContainer |
configureContext(ServletContextHandler context)
Create a ServerContainer properly, useful for embedded application use.
|
static boolean |
isJSR356Context(WebAppContext context) |
void |
preConfigure(WebAppContext context)
Set up for configuration.
|
cloneConfigure, deconfigure, destroy, postConfigure
public static final String ENABLE
public static ServerContainer configureContext(ServletContextHandler context)
Notably, the cometd3 project uses this.
context
- the context to enable javax.websocket support filters onpublic static boolean isJSR356Context(WebAppContext context)
public void configure(WebAppContext context) throws Exception
Configuration
Typically this step applies the discovered configuration resources to
either the WebAppContext
or the associated MetaData
.
configure
in interface Configuration
configure
in class AbstractConfiguration
context
- The context to configureException
public void preConfigure(WebAppContext context) throws Exception
Configuration
Typically this step discovers configuration resources
preConfigure
in interface Configuration
preConfigure
in class AbstractConfiguration
context
- The context to configureException
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.