|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectThincClient
public class ThincClient
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.
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 |
---|
public static final int SEC_ENC
public static final int SEC_AUTH
public static final int DEFAULT_PORT
public static final int OFFSET_SND_PORT
public static final java.lang.String DEFAULT_HOST
public static final byte[] CLIENT_VERSION
public static final int DEFAULT_SEC_CAP
public static final java.lang.String DEFAULT_ID
public static final java.lang.String DEFAULT_PASSWD
private ThincClientCanvas canvas
private ThincFrame frame
private ThincMsgHandler handler
private ThincSoundHandler sound
private java.lang.String host
private int port
private boolean clientResize
private boolean isSound
private int secCap
private java.lang.String id
private java.lang.String passwd
private boolean isReady
private int sndPort
Constructor Detail |
---|
public ThincClient()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- public void close()
public int getSecCap()
public java.lang.String getHost()
public int getPort()
public int getSndPort()
public void setSecCap(int sec)
public java.lang.String getPasswd()
public java.lang.String getId()
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)
server
- Server DNSport
- Server portauth
- Whether auth is requested by user or notssl
- Whether SSL is requested by user or notid
- User id to connect the serverpasswd
- Password to connect the serverThincFrame
public boolean getClientResize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |