javax.websocket.server
Class ServerContainerProvider

java.lang.Object
  extended by javax.websocket.server.ServerContainerProvider

public abstract class ServerContainerProvider
extends Object

The ServerContainerProvider class allows the developer to obtain a reference to the instance of the ServerContainer for containing application. This is intended for standalone implementations to bootstrap the ServerContainer, or for implementations in the web container to obtain a reference to the ServerContainer from within a Java servlet API ServletContextListener in order to do programmatic deployment.

Author:
dannycoward

Constructor Summary
ServerContainerProvider()
           
 
Method Summary
protected abstract  ServerContainer getContainer()
          Load the server container implementation.
static ServerContainer getServerContainer()
          Obtain a reference to the instance of the ServerContainer during application deployment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerContainerProvider

public ServerContainerProvider()
Method Detail

getServerContainer

public static ServerContainer getServerContainer()
Obtain a reference to the instance of the ServerContainer during application deployment. Developers wishing to access the ServerContainer instance from within an active endpoint should call Session.getContainer() instead.

Returns:
the ServerContainer instance
Throws:
IllegalStateException - if called from within an active endpoint.

getContainer

protected abstract ServerContainer getContainer()
Load the server container implementation.

Returns:
the server container class
Throws:
IllegalStateException - if called from within an active websocket endpoint.


Copyright © 2012-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Comments to : users@websocket-spec.java.net