# Class ContainerProvider

java.lang.Object
jakarta.websocket.ContainerProvider

public abstract class ContainerProvider extends Object
Use the `ServiceLoader` mechanism to provide instances of the WebSocket client container.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`ContainerProvider()`
Creates a new ContainerProvider instance.

## Method Summary

Modifier and Type
Method
Description
`protected abstract WebSocketContainer`
`getContainer()`
Returns the WebSocket container provided by this provider.
`static WebSocketContainer`
`getWebSocketContainer()`
Create a new container used to create outgoing WebSocket connections.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ContainerProvider

protected ContainerProvider()
Creates a new ContainerProvider instance.

## Method Details

### getWebSocketContainer

public static WebSocketContainer getWebSocketContainer()
Create a new container used to create outgoing WebSocket connections.

Returns:
  A newly created container.

### getContainer

protected abstract WebSocketContainer getContainer()
Returns the WebSocket container provided by this provider.

Returns:
  The WebSocket container