com.toremote.websocket.handler
Class PlayHandler

java.lang.Object
  extended by com.toremote.websocket.handler.AbstractHandler
      extended by com.toremote.websocket.handler.PlayHandler
All Implemented Interfaces:
PlayerInterface, HandlerInterface

public class PlayHandler
extends AbstractHandler
implements PlayerInterface


Nested Class Summary
(package private)  class PlayHandler.PlayData
           
(package private)  class PlayHandler.Player
           
 
Field Summary
(package private) static int CMD_PLAY_INFO
           
 
Fields inherited from class com.toremote.websocket.handler.AbstractHandler
CLIENT_CLOSE, clientProperties, INFO_TAG, listener, out, properties, startTime, userAgent, userIp, WARGIN_TAG
 
Fields inherited from interface com.toremote.websocket.handler.HandlerInterface
ARG_CLIENT_IP, ARG_HOST
 
Constructor Summary
PlayHandler()
           
 
Method Summary
 StreamInfo getInputStream(java.util.Map<java.lang.String,java.lang.String> properties)
          Invoked when client request to play a recorded file
 void onBinaryReceived(byte[] frame)
          process client side binary message.
 void onText(java.lang.String result)
           
 void processHandShake(java.lang.String action, java.util.Map<java.lang.String,java.lang.String> p)
           
 
Methods inherited from class com.toremote.websocket.handler.AbstractHandler
checkLicense, exit, getGatewayWebAddress, getSessionId, handshake, isTrue, onClientDisconnected, onHandShake, onTextReceived, sendError, sendError, sendError, setHandshakeListener, setOutput, setSessionId, showMessge, showMessge, toJson
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_PLAY_INFO

static final int CMD_PLAY_INFO
See Also:
Constant Field Values
Constructor Detail

PlayHandler

public PlayHandler()
Method Detail

onText

public void onText(java.lang.String result)
            throws java.lang.Exception
Specified by:
onText in class AbstractHandler
Throws:
java.lang.Exception

onBinaryReceived

public void onBinaryReceived(byte[] frame)
Description copied from interface: HandlerInterface
process client side binary message.

Specified by:
onBinaryReceived in interface HandlerInterface

processHandShake

public void processHandShake(java.lang.String action,
                             java.util.Map<java.lang.String,java.lang.String> p)
                      throws java.lang.Exception
Specified by:
processHandShake in class AbstractHandler
Throws:
java.lang.Exception

getInputStream

public StreamInfo getInputStream(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface: PlayerInterface
Invoked when client request to play a recorded file

Specified by:
getInputStream in interface PlayerInterface
Parameters:
properties - parameter transfered from client side
Returns:
The stream information for the recorded file. You can load the recorded file from your database and return the input stream for playback.
See Also:
StreamInfo