public class JettyClientContainerProvider
extends javax.websocket.ContainerProvider
ContainerProvider
implementation.
Created by a ServiceLoader
call in the
ContainerProvider.getWebSocketContainer()
call.
Constructor and Description |
---|
JettyClientContainerProvider() |
Modifier and Type | Method and Description |
---|---|
protected javax.websocket.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 |
public static void useSingleton(boolean flag)
ContainerProvider.getWebSocketContainer()
to always
return a singleton instance of the same WebSocketContainer
flag
- 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 WebSocketContainer
WebSocketContainer
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.ServletContext
public java.lang.Object getContextHandler()
protected javax.websocket.WebSocketContainer getContainer()
ContainerProvider.getWebSocketContainer()
to get a new instance
of the Client WebSocketContainer
.getContainer
in class javax.websocket.ContainerProvider
Copyright © 1995–2023 Webtide. All rights reserved.