Chat
Interface Console

All Known Implementing Classes:
TextConsole, AWTConsole

interface Console

The interface which defines a console for worker classes. Implementing classes enable the application to run both in text and graphic mode.

See Also:
TextConsole, AWTConsole

Method Summary
 void close()
          Closes the console window.
 void error(java.lang.String message)
          Writes an error message to the console.
 java.lang.String readLine()
          Reads a line from the console, blocks until it is available.
 void setTitle(java.lang.String title)
          Sets a title of the window.
 void updateUserList(java.util.Collection list)
          Updates a user list.
 void writeLine(java.lang.String message)
          Writes a line to the console.
 

Method Detail

readLine

public java.lang.String readLine()
Reads a line from the console, blocks until it is available.
Returns:
the line read.

writeLine

public void writeLine(java.lang.String message)
Writes a line to the console.
Parameters:
message - the line to be written.

error

public void error(java.lang.String message)
Writes an error message to the console.
Parameters:
message - the message to be written.

updateUserList

public void updateUserList(java.util.Collection list)
Updates a user list.
Parameters:
list - a collection of String objects.

setTitle

public void setTitle(java.lang.String title)
Sets a title of the window.
Parameters:
title - the desired title.

close

public void close()
Closes the console window.
Parameters:
title - the desired title.