Top Description Constructors Methods
org.eclipse.jetty.ee10.websocket.jakarta.client

public Class JakartaWebSocketClientContainerProvider

extends ContainerProvider
Class Inheritance
Imports
jakarta.websocket.ContainerProvider, .WebSocketContainer, org.eclipse.jetty.client.HttpClient, org.eclipse.jetty.util.component.LifeCycle

Client ContainerProvider implementation.

Created by a java.util.ServiceLoader call in the jakarta.websocket.ContainerProvider#getWebSocketContainer() call.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected WebSocketContainer
public static WebSocketContainer
getContainer(HttpClient
a pre-configured HttpClient to be used by the implementation.
httpClient
)

Get a new instance of a client WebSocketContainer which uses a supplied HttpClient.

public static void
Inherited from jakarta.websocket.ContainerProvider:
getWebSocketContainer

Constructor Detail

JakartaWebSocketClientContainerProviderback to summary
public JakartaWebSocketClientContainerProvider()

Method Detail

getContainerback to summary
protected WebSocketContainer getContainer()

Implements abstract jakarta.websocket.ContainerProvider.getContainer.

Used by ContainerProvider#getWebSocketContainer() to get a NEW INSTANCE of the Client WebSocketContainer.

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.

Returns:WebSocketContainer

Doc from jakarta.websocket.ContainerProvider.getContainer.

the new instance

Annotations
@Override
getContainerback to summary
public static WebSocketContainer getContainer(HttpClient httpClient)

Get a new instance of a client WebSocketContainer which uses a supplied HttpClient.

Parameters
httpClient:HttpClient

a pre-configured HttpClient to be used by the implementation.

See Also
getContainer()
stopback to summary
public static void stop(WebSocketContainer container) throws Exception