com.toremote.gateway.plugin
Class AbstractGatewayChannel

java.lang.Object
  extended by com.toremote.gateway.plugin.AbstractGatewayChannel

public abstract class AbstractGatewayChannel
extends java.lang.Object

Used for communication between browser and gateway It added an extra communication layer on current websocket connection.


Constructor Summary
AbstractGatewayChannel()
           
 
Method Summary
abstract  void close()
          Channel is closed
abstract  int getFlags()
           
abstract  java.lang.String getName()
           
 SessionInformation getSessionInfo()
           
abstract  void open()
          Channel is opened
abstract  void process(net.protocol.utils.DataView data)
          process the client side data
 void sendData(net.protocol.utils.DataView data)
          Send data to client side
 void setOutput(com.toremote.websocket.OutputInterface oi)
          set up OuputInterface, used to initialize the plugin.
 void setSessionInfo(SessionInformation info)
          Used to initialize the plugin, don't call this in the plugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGatewayChannel

public AbstractGatewayChannel()
Method Detail

getSessionInfo

public SessionInformation getSessionInfo()
Returns:
curremt session information
See Also:
SessionInformation

setSessionInfo

public void setSessionInfo(SessionInformation info)
Used to initialize the plugin, don't call this in the plugin

Parameters:
info - session information

getName

public abstract java.lang.String getName()
Returns:
name the name for the channel, max length is 8. Ascii characters only;

getFlags

public abstract int getFlags()
Returns:
flags for channel, not used for now

process

public abstract void process(net.protocol.utils.DataView data)
process the client side data

Parameters:
data -
See Also:
DataView

setOutput

public final void setOutput(com.toremote.websocket.OutputInterface oi)
set up OuputInterface, used to initialize the plugin. Please use sendData instead in the plugin.

Parameters:
oi -

open

public abstract void open()
Channel is opened


close

public abstract void close()
Channel is closed


sendData

public void sendData(net.protocol.utils.DataView data)
              throws java.io.IOException
Send data to client side

Parameters:
data -
Throws:
java.io.IOException