Class JavaxWebSocketClientContainerProvider
java.lang.Object
javax.websocket.ContainerProvider
org.eclipse.jetty.websocket.javax.client.JavaxWebSocketClientContainerProvider
public class JavaxWebSocketClientContainerProvider
extends javax.websocket.ContainerProvider
Client
ContainerProvider
implementation.
Created by a ServiceLoader
call in the
ContainerProvider.getWebSocketContainer()
call.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected javax.websocket.WebSocketContainer
Used byContainerProvider.getWebSocketContainer()
to get a NEW INSTANCE of the ClientWebSocketContainer
.static javax.websocket.WebSocketContainer
getContainer
(HttpClient httpClient) Get a new instance of a clientWebSocketContainer
which uses a suppliedHttpClient
.static void
stop
(javax.websocket.WebSocketContainer container) Methods inherited from class javax.websocket.ContainerProvider
getWebSocketContainer
-
Constructor Details
-
JavaxWebSocketClientContainerProvider
public JavaxWebSocketClientContainerProvider()
-
-
Method Details
-
stop
- Throws:
Exception
-
getContainer
protected javax.websocket.WebSocketContainer getContainer()Used byContainerProvider.getWebSocketContainer()
to get a NEW INSTANCE of the ClientWebSocketContainer
.NOTE: A WebSocket Client Container is a heavyweight object. It is dangerous to repeatedly request a new container, or to manage many containers. The existing javax.websocket API has no lifecycle for a ClientContainer, once started they exist for the duration of the JVM with no ability to stop them. See/Comment on javax.websocket Issue #212 if this is a big concern for you.
- Specified by:
getContainer
in classjavax.websocket.ContainerProvider
-
getContainer
Get a new instance of a clientWebSocketContainer
which uses a suppliedHttpClient
.- Parameters:
httpClient
- a pre-configuredHttpClient
to be used by the implementation.- See Also:
-