javax.websocket
Class ContainerProvider

java.lang.Object
  extended by javax.websocket.ContainerProvider

public abstract class ContainerProvider
extends Object

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 JAR file containing the websocket API.

Author:
dannycoward

Constructor Summary
ContainerProvider()
           
 
Method Summary
protected abstract
<T> T
getContainer(Class<T> containerClass)
          Load the container implementation.
static WebSocketContainer getWebSocketContainer()
          Obtain a new instance of a WebSocketContainer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerProvider

public ContainerProvider()
Method Detail

getWebSocketContainer

public static WebSocketContainer getWebSocketContainer()
Obtain a new instance of a WebSocketContainer.

Returns:
an implementation provided instance of type WebSocketContainer

getContainer

protected abstract <T> T getContainer(Class<T> containerClass)
Load the container implementation.

Type Parameters:
T -
Parameters:
containerClass -
Returns:



Copyright © 2012-2013 Oracle and/or its affiliates. All rights reserved.