org.apache.qpid.tools.utils
Interface Console

All Known Implementing Classes:
SimpleConsole

public interface Console


Nested Class Summary
static class Console.CellFormat
           
 
Field Summary
static String ROW_DIVIDER
           
 
Method Summary
 void close()
           
 void displayList(boolean hasTitle, String... list)
          Prints the list of String nicely.
 CommandParser getCommandParser()
           
 void print(String... message)
           
 void println(String... message)
           
 void printMap(String title, List<List> entries)
          Prints the list of String nicely.
 String[] readCommand()
          Reads and parses the command line.
 String readln()
           
 void setCommandParser(CommandParser parser)
           
 

Field Detail

ROW_DIVIDER

static final String ROW_DIVIDER
See Also:
Constant Field Values
Method Detail

print

void print(String... message)

println

void println(String... message)

readln

String readln()

readCommand

String[] readCommand()
Reads and parses the command line.

Returns:
The next command or null

getCommandParser

CommandParser getCommandParser()

setCommandParser

void setCommandParser(CommandParser parser)

displayList

void displayList(boolean hasTitle,
                 String... list)
Prints the list of String nicely. +-------------+ | Heading | +-------------+ | Item 1 | | Item 2 | | Item 3 | +-------------+

Parameters:
hasTitle - should list[0] be used as a heading
list - The list of Strings to display

printMap

void printMap(String title,
              List<List> entries)
Prints the list of String nicely. +----------------------------+ | Heading | +----------------------------+ | title | title | .. +----------------------------+ | Item 2 | value 2 | .. +----------------------------+ (*divider) | Item 3 | value 2 | .. +----------------------------+

Parameters:
title - The title to display if any
entries - the entries to display in a map.

close

void close()


Licensed to the Apache Software Foundation