public class JettyClientContainerProvider extends ContainerProvider
ContainerProvider implementation.
Created by a ServiceLoader call in the
ContainerProvider.getWebSocketContainer() call.
| Constructor | Description |
|---|---|
JettyClientContainerProvider() |
| Modifier and Type | Method | Description |
|---|---|---|
protected WebSocketContainer |
getContainer() |
Used by
ContainerProvider.getWebSocketContainer() to get a new instance
of the Client WebSocketContainer. |
java.lang.Object |
getContextHandler() |
|
static void |
useServerContainer(boolean flag) |
Add ability of calls to
ContainerProvider.getWebSocketContainer() to
find and return the javax.websocket.server.ServerContainer from the
active javax.servlet.ServletContext. |
static void |
useSingleton(boolean flag) |
Change calls to
ContainerProvider.getWebSocketContainer() to always
return a singleton instance of the same WebSocketContainer |
static boolean |
willUseServerContainer() |
Test if
ContainerProvider.getWebSocketContainer() has the ability to
find and return the javax.websocket.server.ServerContainer from the
active javax.servlet.ServletContext, before creating a new client based
WebSocketContainer. |
static boolean |
willUseSingleton() |
Test if
ContainerProvider.getWebSocketContainer() will always
return a singleton instance of the same WebSocketContainer |
getWebSocketContainerpublic static void useSingleton(boolean flag)
ContainerProvider.getWebSocketContainer() to always
return a singleton instance of the same WebSocketContainerflag - true to use a singleton instance of WebSocketContainer for all
calls to ContainerProvider.getWebSocketContainer()public static boolean willUseSingleton()
ContainerProvider.getWebSocketContainer() will always
return a singleton instance of the same WebSocketContainerWebSocketContainer for all
calls to ContainerProvider.getWebSocketContainer()public static void useServerContainer(boolean flag)
ContainerProvider.getWebSocketContainer() to
find and return the javax.websocket.server.ServerContainer from the
active javax.servlet.ServletContext.
This will only work if the call to ContainerProvider.getWebSocketContainer()
occurs within a thread being processed by the Servlet container.
flag - true to to use return the javax.websocket.server.ServerContainer
from the active javax.servlet.ServletContext for all calls to
ContainerProvider.getWebSocketContainer() from within a Servlet thread.public static boolean willUseServerContainer()
ContainerProvider.getWebSocketContainer() has the ability to
find and return the javax.websocket.server.ServerContainer from the
active javax.servlet.ServletContext, before creating a new client based
WebSocketContainer.WebSocketContainer returned from
calls to ContainerProvider.getWebSocketContainer() could be the
javax.websocket.server.ServerContainer
from the active javax.servlet.ServletContextpublic java.lang.Object getContextHandler()
protected WebSocketContainer getContainer()
ContainerProvider.getWebSocketContainer() to get a new instance
of the Client WebSocketContainer.getContainer in class ContainerProviderCopyright © 1995–2018 Webtide. All rights reserved.