org.glassfish.grizzly.websockets
Class WebSocketEngine

java.lang.Object
  extended by org.glassfish.grizzly.websockets.WebSocketEngine

public class WebSocketEngine
extends Object

WebSockets engine implementation (singlton), which handles WebSocketApplications registration, responsible for client and server handshake validation.

Author:
Alexey Stashok.
See Also:
WebSocket, WebSocketApplication

Constructor Summary
WebSocketEngine()
           
 
Method Summary
static WebSocketEngine getEngine()
          Get WebSocketEngine instance (singleton).
 WebSocketApplication lookupApplication(String name)
          Get the WebSocketApplication, associated with the passed name.
 void registerApplication(String name, WebSocketApplication app)
          Register the WebSocketApplication and associate it with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketEngine

public WebSocketEngine()
Method Detail

getEngine

public static WebSocketEngine getEngine()
Get WebSocketEngine instance (singleton).

Returns:
WebSocketEngine instance (singleton).

lookupApplication

public WebSocketApplication lookupApplication(String name)
Get the WebSocketApplication, associated with the passed name. Name is usually taken as URL's path.

Parameters:
name - the WebSocketApplication name, usually represented by URL's path.
Returns:
WebSocketApplication.

registerApplication

public void registerApplication(String name,
                                WebSocketApplication app)
Register the WebSocketApplication and associate it with the given name. Name is usually taken as URL's path.

Parameters:
name - WebSocketApplication name (usually taken as URL's path).
app - WebSocketApplication


Copyright © 2010 Oracle Corpration. All Rights Reserved.