Class JakartaWebSocketClientContainerProvider
java.lang.Object
jakarta.websocket.ContainerProvider
org.eclipse.jetty.ee10.websocket.jakarta.client.JakartaWebSocketClientContainerProvider
public class JakartaWebSocketClientContainerProvider
extends jakarta.websocket.ContainerProvider
Client
ContainerProvider
implementation.
Created by a ServiceLoader
call in the
ContainerProvider.getWebSocketContainer()
call.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.websocket.WebSocketContainer
Used byContainerProvider.getWebSocketContainer()
to get a NEW INSTANCE of the ClientWebSocketContainer
.static jakarta.websocket.WebSocketContainer
getContainer
(HttpClient httpClient) Get a new instance of a clientWebSocketContainer
which uses a suppliedHttpClient
.static void
stop
(jakarta.websocket.WebSocketContainer container) Methods inherited from class jakarta.websocket.ContainerProvider
getWebSocketContainer
-
Constructor Details
-
JakartaWebSocketClientContainerProvider
public JakartaWebSocketClientContainerProvider()
-
-
Method Details
-
stop
- Throws:
Exception
-
getContainer
protected jakarta.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 jakarta.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 jakarta.websocket Issue #212 if this is a big concern for you.
- Specified by:
getContainer
in classjakarta.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:
-