Class ThincCMsgSoundStart

java.lang.Object
  extended by ThincMsg
      extended by ThincCMsg
          extended by ThincCMsgSound
              extended by ThincCMsgSoundStart

public class ThincCMsgSoundStart
extends ThincCMsgSound

ThincCMsgSoundStarts sends the init messages for sound. because it operates different port from frame buffer or video messages, it is as same as T_CSTART messages from Protocol specification.

Author:
Young Jin Yoon
See Also:
ThincCMsgSound

Field Summary
static int MESSAGE_SIZE
           
static int MESSAGE_TYPE
           
(package private)  byte[] version
           
static int VERSION_LENGTH
           
 
Fields inherited from class ThincMsg
canvas, handler
 
Constructor Summary
ThincCMsgSoundStart(ThincHandler h, byte[] version)
          creates ThincCMsgSoundStart object.
 
Method Summary
 byte getMsgType()
          getMsgType() returns a type of the message.
 short messageSize()
          messageSize() returns the total messageSize to send.
 void process()
          process() is general processing method for each thinc messages.
 void putMessage(java.nio.ByteBuffer b)
          putMessage() just puts the version information with network order.
 
Methods inherited from class ThincCMsg
getFlag, headerSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_TYPE

public static final int MESSAGE_TYPE
See Also:
Constant Field Values

MESSAGE_SIZE

public static final int MESSAGE_SIZE
See Also:
Constant Field Values

VERSION_LENGTH

public static final int VERSION_LENGTH
See Also:
Constant Field Values

version

byte[] version
Constructor Detail

ThincCMsgSoundStart

public ThincCMsgSoundStart(ThincHandler h,
                           byte[] version)
                    throws ThincException
creates ThincCMsgSoundStart object.

Parameters:
h - ThincMsgHandler to handle the message
version - version information from the sound handler
Throws:
ThincException
Method Detail

getMsgType

public byte getMsgType()
Description copied from class: ThincCMsg
getMsgType() returns a type of the message.

Specified by:
getMsgType in class ThincCMsg
Returns:
type of message

messageSize

public short messageSize()
Description copied from class: ThincCMsg
messageSize() returns the total messageSize to send.

Specified by:
messageSize in class ThincCMsg
Returns:
total messageSize refered from ThincMsgHandler class

putMessage

public void putMessage(java.nio.ByteBuffer b)
putMessage() just puts the version information with network order.

Specified by:
putMessage in class ThincCMsg
Parameters:
b - ByteBuffer object to send

process

public void process()
             throws ThincException
Description copied from class: ThincMsg
process() is general processing method for each thinc messages. Most of client messages, it simply invokes send() methods in ThincMsgHandler object to send the client messages. In server messages, it interacts with ThincClientCanvas in this method.

Specified by:
process in class ThincMsg
Throws:
ThincException