com.toremote.websocket.handler
Class HandlerManager

java.lang.Object
  extended by com.toremote.websocket.handler.HandlerManager

public class HandlerManager
extends java.lang.Object


Constructor Summary
HandlerManager()
           
 
Method Summary
static AbstractGatewayChannel getChannel(java.lang.String name)
           
static HandlerInterface getHandler(java.lang.String path)
           
static void register(java.lang.String path, java.lang.Class handlerClass)
           
static void registerChannel(java.lang.String name, java.lang.Class<? extends AbstractGatewayChannel> gc)
          register a GatewayChannel which is used for communication between browser and gateway
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerManager

public HandlerManager()
Method Detail

getHandler

public static HandlerInterface getHandler(java.lang.String path)
                                   throws java.lang.InstantiationException,
                                          java.lang.IllegalAccessException
Parameters:
path - url path, like RDP, VNC etc
Returns:
Handler for this Path
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

register

public static void register(java.lang.String path,
                            java.lang.Class handlerClass)
Parameters:
path - url path
handlerClass - handler for this path.

registerChannel

public static void registerChannel(java.lang.String name,
                                   java.lang.Class<? extends AbstractGatewayChannel> gc)
register a GatewayChannel which is used for communication between browser and gateway

Parameters:
name - channel name
gc - channel class which extends AbstractGatewayChannel

getChannel

public static AbstractGatewayChannel getChannel(java.lang.String name)
                                         throws java.lang.InstantiationException,
                                                java.lang.IllegalAccessException
Parameters:
name -
Returns:
Gateway channel.
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException