|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ClientConsole
This class constructs the UI for a chat client. It implements the chat interface in order to activate the display() method. Warning: Some of the code here is cloned in ServerConsole
Field Summary | |
(package private) ChatClient |
client
The instance of the client that created this ConsoleChat. |
static int |
DEFAULT_PORT
The default port to connect on. |
Constructor Summary | |
ClientConsole(java.lang.String host,
int port)
Constructs an instance of the ClientConsole UI. |
Method Summary | |
void |
accept()
This method waits for input from the console. |
void |
display(java.lang.String message)
This method overrides the method in the ChatIF interface. |
static void |
main(java.lang.String[] args)
This method is responsible for the creation of the Client UI. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int DEFAULT_PORT
ChatClient client
Constructor Detail |
public ClientConsole(java.lang.String host, int port)
host
- The host to connect to.port
- The port to connect on.Method Detail |
public void accept()
public void display(java.lang.String message)
message
- The string to be displayed.public static void main(java.lang.String[] args)
args[0]
- The host to connect to.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |