|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--ocsf.client.AbstractClient
|
+--client.ChatClient
This class overrides some of the methods defined in the abstract superclass in order to give more functionality to the client.
| Field Summary | |
(package private) ChatIF |
clientUI
The interface type variable. |
| Fields inherited from class ocsf.client.AbstractClient |
clientReader,
clientSocket,
host,
input,
output,
port,
readyToStop |
| Constructor Summary | |
ChatClient(java.lang.String host,
int port,
ChatIF clientUI)
Constructs an instance of the chat client. |
|
| Method Summary | |
void |
handleMessageFromClientUI(java.lang.String message)
This method handles all data coming from the UI |
void |
handleMessageFromServer(java.lang.Object msg)
This method handles all data that comes in from the server. |
void |
quit()
This method terminates the client. |
| Methods inherited from class ocsf.client.AbstractClient |
closeAll,
closeConnection,
connectionClosed,
connectionEstablished,
connectionException,
getHost,
getInetAddress,
getPort,
isConnected,
openConnection,
run,
sendToServer,
setHost,
setPort |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
ChatIF clientUI
| Constructor Detail |
public ChatClient(java.lang.String host,
int port,
ChatIF clientUI)
throws java.io.IOException
host - The server to connect to.port - The port number to connect on.clientUI - The interface type variable.| Method Detail |
public void handleMessageFromServer(java.lang.Object msg)
msg - The message from the server.public void handleMessageFromClientUI(java.lang.String message)
message - The message from the UI.public void quit()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||