Class ThincClient

java.lang.Object
  extended by ThincClient

public class ThincClient
extends java.lang.Object

main class for entire thinc client. it create ThincFrame object to get the argument from user. Next, it pass the argument into ThincMsgHandler object from ThincFrame object. it creates ThincClientCanvas object and finally, invokes ThincMsgHandler.init() and ThincMsgHandler.start() to handle the message from the server.

Since:
2006
Version:
1.8
Author:
Young Jin Yoon

Field Summary
private  ThincClientCanvas canvas
           
static byte[] CLIENT_VERSION
           
private  boolean clientResize
           
static java.lang.String DEFAULT_HOST
           
static java.lang.String DEFAULT_ID
           
static java.lang.String DEFAULT_PASSWD
           
static int DEFAULT_PORT
           
static int DEFAULT_SEC_CAP
           
private  ThincFrame frame
           
private  ThincMsgHandler handler
           
private  java.lang.String host
           
private  java.lang.String id
           
private  boolean isReady
           
private  boolean isSound
           
static int OFFSET_SND_PORT
           
private  java.lang.String passwd
           
private  int port
           
static int SEC_AUTH
           
static int SEC_ENC
           
private  int secCap
           
private  int sndPort
           
private  ThincSoundHandler sound
           
 
Constructor Summary
ThincClient()
          ThincClient() makes ThincFrame object and wait the user input by using Thread.sleep(). then pass the argument into ThincMsgHandler object and invoke init() and start().
 
Method Summary
 void close()
          close() when the user pushes X on the window, or error occurs, it should be invoked by try-catch phases.
 boolean getClientResize()
           
 java.lang.String getHost()
           
 java.lang.String getId()
           
 java.lang.String getPasswd()
           
 int getPort()
           
 int getSecCap()
           
 int getSndPort()
           
static void main(java.lang.String[] args)
          main() just makes a ThincClient object. the constructor of ThincClient does everything.
 void setLoginProperty(java.lang.String server, int port, boolean auth, boolean ssl, boolean sound, int sndPort, java.lang.String id, java.lang.String passwd)
          setLoginProperty() used to set the initial information from the user. invoked by ThincFrame object
 void setSecCap(int sec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEC_ENC

public static final int SEC_ENC
See Also:
Constant Field Values

SEC_AUTH

public static final int SEC_AUTH
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

OFFSET_SND_PORT

public static final int OFFSET_SND_PORT
See Also:
Constant Field Values

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
See Also:
Constant Field Values

CLIENT_VERSION

public static final byte[] CLIENT_VERSION

DEFAULT_SEC_CAP

public static final int DEFAULT_SEC_CAP
See Also:
Constant Field Values

DEFAULT_ID

public static final java.lang.String DEFAULT_ID
See Also:
Constant Field Values

DEFAULT_PASSWD

public static final java.lang.String DEFAULT_PASSWD
See Also:
Constant Field Values

canvas

private ThincClientCanvas canvas

frame

private ThincFrame frame

handler

private ThincMsgHandler handler

sound

private ThincSoundHandler sound

host

private java.lang.String host

port

private int port

clientResize

private boolean clientResize

isSound

private boolean isSound

secCap

private int secCap

id

private java.lang.String id

passwd

private java.lang.String passwd

isReady

private boolean isReady

sndPort

private int sndPort
Constructor Detail

ThincClient

public ThincClient()
ThincClient() makes ThincFrame object and wait the user input by using Thread.sleep(). then pass the argument into ThincMsgHandler object and invoke init() and start().

Method Detail

main

public static void main(java.lang.String[] args)
main() just makes a ThincClient object. the constructor of ThincClient does everything.

Parameters:
args -

close

public void close()
close() when the user pushes X on the window, or error occurs, it should be invoked by try-catch phases.


getSecCap

public int getSecCap()

getHost

public java.lang.String getHost()

getPort

public int getPort()

getSndPort

public int getSndPort()

setSecCap

public void setSecCap(int sec)

getPasswd

public java.lang.String getPasswd()

getId

public java.lang.String getId()

setLoginProperty

public void setLoginProperty(java.lang.String server,
                             int port,
                             boolean auth,
                             boolean ssl,
                             boolean sound,
                             int sndPort,
                             java.lang.String id,
                             java.lang.String passwd)
setLoginProperty() used to set the initial information from the user. invoked by ThincFrame object

Parameters:
server - Server DNS
port - Server port
auth - Whether auth is requested by user or not
ssl - Whether SSL is requested by user or not
id - User id to connect the server
passwd - Password to connect the server
See Also:
ThincFrame

getClientResize

public boolean getClientResize()