Class ThincCMsg

java.lang.Object
  extended by ThincMsg
      extended by ThincCMsg
Direct Known Subclasses:
ThincCMsgEvent, ThincCMsgInit, ThincCMsgResize, ThincCMsgSound, ThincCMsgVideo

public abstract class ThincCMsg
extends ThincMsg

abstract class for client messages. it represents CLIENT => SERVER messages on protocol specification. every client messages should derived from this class.

Author:
Young Jin Yoon
See Also:
ThincMsg

Field Summary
 
Fields inherited from class ThincMsg
canvas, handler
 
Constructor Summary
ThincCMsg(ThincHandler h, ThincClientCanvas c)
           
 
Method Summary
 byte getFlag()
          getFlag() get the flag option from client message. it is just for future development.
abstract  byte getMsgType()
          getMsgType() returns a type of the message.
 short headerSize()
          headerSize() returns the header size of the client message. different from messageSize() method, it only returns the header of total messages.
abstract  short messageSize()
          messageSize() returns the total messageSize to send.
abstract  void putMessage(java.nio.ByteBuffer b)
          putMessage() puts messages to send to server.
 
Methods inherited from class ThincMsg
process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThincCMsg

public ThincCMsg(ThincHandler h,
                 ThincClientCanvas c)
Method Detail

messageSize

public abstract short messageSize()
messageSize() returns the total messageSize to send.

Returns:
total messageSize refered from ThincMsgHandler class

putMessage

public abstract void putMessage(java.nio.ByteBuffer b)
putMessage() puts messages to send to server.

Parameters:
b - ByteBuffer object to send

getMsgType

public abstract byte getMsgType()
getMsgType() returns a type of the message.

Returns:
type of message

headerSize

public short headerSize()
headerSize() returns the header size of the client message. different from messageSize() method, it only returns the header of total messages. If you want to send more than thinc header to the server, override this method and put the proper header size onto overriden method.

Returns:
header size of message
See Also:
ThincCMsgInitRequestVideoClientFormat

getFlag

public byte getFlag()
getFlag() get the flag option from client message. it is just for future development. set to 0 for now. If you want set the flag on client message, override this method and put the proper flag onto overriden method.

Returns:
flags of message