public class ConsoleShellCommandReader extends AbstractShellCommandReader
ShellCommandReader that uses standard input
to read commands typed in by the user. This implementation uses the Java
System.console() facility to read user input.| Constructor and Description |
|---|
ConsoleShellCommandReader(ShellCommandFactory factory,
ShellContext context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called by the shell when exiting.
|
void |
open()
Called to open the shell command reader.
|
protected String |
readLine()
Reads a single line from the input source (e.g.
|
getCommandOutput, getContext, getFactory, readpublic ConsoleShellCommandReader(ShellCommandFactory factory, ShellContext 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()public void close()
throws IOException
ShellCommandReaderclose in interface ShellCommandReaderclose in class AbstractShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.ShellCommandReader#close()Copyright © 2011–2013 JBoss, a division of Red Hat. All rights reserved.