|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.console.text.Console
This is the C-JDBC controller console that allows remote administration and monitoring of any C-JDBC controller.
Field Summary | |
private VirtualDatabaseAdmin |
adminModule
Virtual database administration console. |
private VirtualDatabaseConsole |
consoleModule
Virtual database console. |
private jline.ConsoleReader |
consoleReader
ConsoleReader allowing to reading input. |
private ControllerConsole |
controllerModule
Controller Console |
private boolean |
debug
Debug Mode |
private boolean |
interactive
true if the console is used in interactive mode. |
private RmiJmxClient |
jmxClient
|
private MonitorConsole |
monitorModule
Monitoring console |
private static java.lang.Character |
PASSWORD_CHAR
|
private boolean |
printColor
true if colors should be displayed in interactive mode (work
only on non Windows system). |
Constructor Summary | |
Console(RmiJmxClient jmxClient,
java.io.InputStream in,
boolean interactive,
boolean debug)
Creates a new Console instance. |
Method Summary | |
VirtualDatabaseAdmin |
getAdminModule()
Returns the adminModule value. |
VirtualDatabaseConsole |
getConsoleModule()
Returns the consoleModule value. |
jline.ConsoleReader |
getConsoleReader()
Returns the consoleReader value. |
ControllerConsole |
getControllerModule()
Returns the controllerModule value. |
RmiJmxClient |
getJmxClient()
Returns the jmxClient value. |
MonitorConsole |
getMonitorModule()
Returns the monitorModule value. |
void |
handlePrompt()
Main menu prompt handling. |
boolean |
isInteractive()
Returns the interactive value. |
private jline.History |
loadJLineHistory()
|
void |
print(java.lang.String s)
|
void |
print(java.lang.String s,
int color)
|
void |
printError(java.lang.String message)
|
void |
printError(java.lang.String message,
java.lang.Exception e)
Display an error and stack trace if in debug mode. |
void |
printInfo(java.lang.String message)
|
void |
println()
|
void |
println(java.lang.String s)
|
void |
println(java.lang.String s,
int color)
Print in color |
java.lang.String |
readLine(java.lang.String prompt)
|
java.lang.String |
readPassword(java.lang.String prompt)
|
void |
setPrintColor(boolean b)
Should this console display color in interactive mode? |
void |
showInfo(java.lang.String[][] info,
InfoViewer viewer)
Show a table of info in a formatted way |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.Character PASSWORD_CHAR
private jline.ConsoleReader consoleReader
ConsoleReader
allowing to reading input.
private boolean interactive
true
if the console is used in interactive mode.
private RmiJmxClient jmxClient
private VirtualDatabaseAdmin adminModule
private MonitorConsole monitorModule
private VirtualDatabaseConsole consoleModule
private ControllerConsole controllerModule
private boolean debug
private boolean printColor
true
if colors should be displayed in interactive mode (work
only on non Windows system).
Constructor Detail |
public Console(RmiJmxClient jmxClient, java.io.InputStream in, boolean interactive, boolean debug)
Console
instance.
jmxClient
- to connect to the jmxServerin
- the input stream to get the command frominteractive
- if set to true
will display promptdebug
- true
if debug mode should be activated.Method Detail |
private jline.History loadJLineHistory()
public void setPrintColor(boolean b)
b
- true
if the console should display color (ignored
on Windows system).public boolean isInteractive()
public void handlePrompt()
public java.lang.String readLine(java.lang.String prompt) throws ConsoleException
ConsoleException
readLine(java.lang.String)
public java.lang.String readPassword(java.lang.String prompt) throws ConsoleException
ConsoleException
readPassword(java.lang.String)
public void print(java.lang.String s)
print(java.lang.String)
public void print(java.lang.String s, int color)
print(java.lang.String)
public void println(java.lang.String s)
println(java.lang.String)
public void println(java.lang.String s, int color)
s
- the message to displaycolor
- the color to usepublic void println()
println()
public void printError(java.lang.String message)
printError(java.lang.String)
public void printInfo(java.lang.String message)
println()
public void printError(java.lang.String message, java.lang.Exception e)
message
- error messagee
- exception that causes the errorpublic void showInfo(java.lang.String[][] info, InfoViewer viewer)
info
- the data to displayviewer
- the viewer to use to get the name of the columns and the
format of datapublic RmiJmxClient getJmxClient()
public VirtualDatabaseAdmin getAdminModule()
public VirtualDatabaseConsole getConsoleModule()
public ControllerConsole getControllerModule()
public MonitorConsole getMonitorModule()
public final jline.ConsoleReader getConsoleReader()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |