Class WebSocketServerContainerInitializer
- java.lang.Object
-
- org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
-
- All Implemented Interfaces:
ServletContainerInitializer
public class WebSocketServerContainerInitializer extends Object implements ServletContainerInitializer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWebSocketServerContainerInitializer.ContextDestroyListenerDestroyListener
-
Field Summary
Fields Modifier and Type Field Description static StringADD_DYNAMIC_FILTER_KEYstatic StringENABLE_KEYstatic StringHTTPCLIENT_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description WebSocketServerContainerInitializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ServerContainerconfigureContext(ServletContext context, org.eclipse.jetty.servlet.ServletContextHandler jettyContext)Deprecated.useconfigureContext(ServletContextHandler)insteadstatic ServerContainerconfigureContext(org.eclipse.jetty.servlet.ServletContextHandler context)Embedded Jetty approach for non-bytecode scanning.static booleanisEnabledViaContext(ServletContext context, String keyName, boolean defValue)Test a ServletContext forinit-paramorattributeatkeyNamefor true or false setting that determines if the specified feature is enabled (or not).voidonStartup(Set<Class<?>> c, ServletContext context)
-
-
-
Field Detail
-
ENABLE_KEY
public static final String ENABLE_KEY
- See Also:
- Constant Field Values
-
ADD_DYNAMIC_FILTER_KEY
public static final String ADD_DYNAMIC_FILTER_KEY
- See Also:
- Constant Field Values
-
HTTPCLIENT_ATTRIBUTE
public static final String HTTPCLIENT_ATTRIBUTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabledViaContext
public static boolean isEnabledViaContext(ServletContext context, String keyName, boolean defValue)
Test a ServletContext forinit-paramorattributeatkeyNamefor true or false setting that determines if the specified feature is enabled (or not).- Parameters:
context- the context to searchkeyName- the key namedefValue- the default value, if the value is not specified in the context- Returns:
- the value for the feature key
-
configureContext
public static ServerContainer configureContext(org.eclipse.jetty.servlet.ServletContextHandler context) throws ServletException
Embedded Jetty approach for non-bytecode scanning.- Parameters:
context- theServletContextHandlerto use- Returns:
- a configured
ServerContainerinstance - Throws:
ServletException- if theWebSocketUpgradeFiltercannot be configured
-
configureContext
@Deprecated public static ServerContainer configureContext(ServletContext context, org.eclipse.jetty.servlet.ServletContextHandler jettyContext) throws ServletException
Deprecated.useconfigureContext(ServletContextHandler)instead- Parameters:
context- not usedjettyContext- theServletContextHandlerto use- Returns:
- a configured
ServerContainerinstance - Throws:
ServletException- if theWebSocketUpgradeFiltercannot be configured
-
onStartup
public void onStartup(Set<Class<?>> c, ServletContext context) throws ServletException
- Specified by:
onStartupin interfaceServletContainerInitializer- Throws:
ServletException
-
-