public class InteractiveShellCommandReader extends AbstractShellCommandReader implements ShellContextEventHandler
ShellCommandReader that uses JLine to provide
a rich console experience to the user, complete with history, tab completion,
and ansi output.| Constructor and Description |
|---|
InteractiveShellCommandReader(ShellCommandFactory factory,
ShellContextImpl context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called by the shell when exiting.
|
protected Writer |
getCommandOutput()
Gets the output stream that should be used by commands when they need
to print a message to the console.
|
void |
onVariableAdded(QName variableName,
Object value) |
void |
onVariableChanged(QName variableName,
Object value) |
void |
onVariableRemoved(QName variableName) |
void |
open()
Called to open the shell command reader.
|
protected String |
readLine()
Reads a single line from the input source (e.g.
|
getContext, getFactory, readpublic InteractiveShellCommandReader(ShellCommandFactory factory, ShellContextImpl context)
factory - context - public void open()
throws IOException
ShellCommandReaderopen in interface ShellCommandReaderopen in class AbstractShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.AbstractShellCommandReader#open()protected String readLine() throws IOException
AbstractShellCommandReaderreadLine in class AbstractShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.AbstractShellCommandReader#readLine()protected Writer getCommandOutput()
AbstractShellCommandReadergetCommandOutput in class AbstractShellCommandReaderorg.overlord.sramp.common.shell.AbstractShellCommandReader#getCommandOutput()public void close()
throws IOException
ShellCommandReaderclose in interface ShellCommandReaderclose in class AbstractShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.ShellCommandReader#close()public void onVariableAdded(QName variableName, Object value)
onVariableAdded in interface ShellContextEventHandlershell.ShellContextEventHandlerpublic void onVariableChanged(QName variableName, Object value)
onVariableChanged in interface ShellContextEventHandlershell.ShellContextEventHandlerpublic void onVariableRemoved(QName variableName)
onVariableRemoved in interface ShellContextEventHandlershell.ShellContextEventHandlerCopyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.