org.xnap.cmdl
Interface Console

All Known Implementing Classes:
ChannelPanel, ConsoleDialog, ReadlineConsole

public interface Console

Defines the requirements for classes that provides output functionality and possibly support for user input.


Method Summary
 Command getCommand(java.lang.String commandName)
          Returns the Command object that is associated with commandName.
 Command[] getCommands()
          Returns all supported commands.
 boolean isEchoing()
          Returns true, input is echoed on screen.
 void println(java.lang.String text)
          Prints text to screen.
 java.lang.String readln(java.lang.String prompt)
          Reads a line from this console.
 

Method Detail

getCommand

Command getCommand(java.lang.String commandName)
Returns the Command object that is associated with commandName.

Returns:
null, if the command is not supported; the command, otherwise

getCommands

Command[] getCommands()
Returns all supported commands.


isEchoing

boolean isEchoing()
Returns true, input is echoed on screen.


readln

java.lang.String readln(java.lang.String prompt)
Reads a line from this console. Blocks until a line break is read.


println

void println(java.lang.String text)
Prints text to screen.



Copyright © 2001-2005 XNap Team. All Rights Reserved.