Class ThincSoundHandler

java.lang.Object
  extended by ThincHandler
      extended by ThincSoundHandler
All Implemented Interfaces:
java.lang.Runnable

public final class ThincSoundHandler
extends ThincHandler
implements java.lang.Runnable

handles the sound messages only from/to the server. it recoginizes the message's type, flag and length then pass them into the proper message object. Moreover, it also takes the control from client messages to send a message.

Author:
Young Jin Yoon
See Also:
ThincHandler

Field Summary
private static int FIRST_MESSAGE_TYPE
           
protected  java.nio.ByteBuffer hd
           
private static int MAX_MESSAGE_TYPE
           
private  ThincSMsgSound[] serverMessage
           
private static byte[] TC_SND_VERSION
           
 
Fields inherited from class ThincHandler
canvas, client, clientAppData, clientPacData, isSSL, lastSent, MAX_DIRECT_ALLOCATE, rcvResult, recv, sc, send, serverAppData, serverPacData, sslEngine, sslSocket, THINC_HEADERSIZE
 
Constructor Summary
ThincSoundHandler(ThincClient tc, ThincClientCanvas ca)
          create ThincSoundHandler object. it also send initialize message to the server.
 
Method Summary
private  void initMessage()
           
 void run()
          run() implementation of Runnable interface from Java.
private  void sendStart()
          sentStart() sends initialization message to the server.
 
Methods inherited from class ThincHandler
closeSocketChannel, createSocketChannel, getLastSent, getMessage, recvBytes, send, sendBytes, setSSLSocketChannel, SSLHandshake
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_MESSAGE_TYPE

private static final int MAX_MESSAGE_TYPE
See Also:
Constant Field Values

FIRST_MESSAGE_TYPE

private static final int FIRST_MESSAGE_TYPE
See Also:
Constant Field Values

serverMessage

private ThincSMsgSound[] serverMessage

hd

protected java.nio.ByteBuffer hd

TC_SND_VERSION

private static final byte[] TC_SND_VERSION
Constructor Detail

ThincSoundHandler

public ThincSoundHandler(ThincClient tc,
                         ThincClientCanvas ca)
                  throws ThincException
create ThincSoundHandler object. it also send initialize message to the server.

Parameters:
tc - ThincClient object which invokes this
Throws:
ThincException
Method Detail

initMessage

private void initMessage()

run

public void run()
run() implementation of Runnable interface from Java. it starts to receive message from server. if message comes, this parses general thinc header and pass the control to the proper server message class.

Specified by:
run in interface java.lang.Runnable

sendStart

private void sendStart()
                throws ThincException
sentStart() sends initialization message to the server.

Throws:
ThincException