Class ThincCMsgInitAuth

java.lang.Object
  extended by ThincMsg
      extended by ThincCMsg
          extended by ThincCMsgInit
              extended by ThincCMsgInitAuth

public final class ThincCMsgInitAuth
extends ThincCMsgInit

authentication messages. it contains the id and password information for server.

Author:
Young Jin Yoon
See Also:
ThincCMsgInit

Field Summary
(package private)  ThincClient client
           
static int MESSAGE_SIZE
           
static int MESSAGE_TYPE
           
 
Fields inherited from class ThincMsg
canvas, handler
 
Constructor Summary
ThincCMsgInitAuth(ThincClient cl, ThincMsgHandler h, ThincClientCanvas c)
          creates ThincCMsgInitAuth 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() puts length of id, length of password, id, and password, respectively.
 
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

client

ThincClient client
Constructor Detail

ThincCMsgInitAuth

public ThincCMsgInitAuth(ThincClient cl,
                         ThincMsgHandler h,
                         ThincClientCanvas c)
creates ThincCMsgInitAuth object.

Parameters:
cl - ThincClient to get the information such as ID and password
h - ThincMsgHandler to handle the message
c - ThincClientCanvas to get the information
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

putMessage

public void putMessage(java.nio.ByteBuffer b)
putMessage() puts length of id, length of password, id, and password, respectively.

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

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

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