Top Description Constructors Methods
javax.websocket

public abstract Class ContainerProvider

extends Object
Class Inheritance
Imports
java.util.ServiceLoader

Provider class that allows the developer to get a reference to the implementation of the WebSocketContainer. The provider class uses the ServiceLoader to load an implementation of ContainerProvider. Specifically, the fully qualified classname of the container implementation of ContainerProvider must be listed in the META-INF/services/javax.websocket.ContainerProvider file in the implementation JAR file.
Author
dannycoward

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract WebSocketContainer

Returns:

the implementation class
getContainer
()

Load the container implementation.

public static WebSocketContainer

Returns:

an implementation provided instance of type WebSocketContainer
getWebSocketContainer
()

Obtain a new instance of a WebSocketContainer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ContainerProviderback to summary
public ContainerProvider()

Method Detail

getContainerback to summary
protected abstract WebSocketContainer getContainer()

Load the container implementation.

Returns:WebSocketContainer

the implementation class

getWebSocketContainerback to summary
public static WebSocketContainer getWebSocketContainer()

Obtain a new instance of a WebSocketContainer. The method looks for the ContainerProvider implementation class in the order listed in the META-INF/services/javax.websocket.ContainerProvider file, returning the WebSocketContainer implementation from the ContainerProvider implementation that is not null.

Returns:WebSocketContainer

an implementation provided instance of type WebSocketContainer