public class FileShellCommandReader extends AbstractShellCommandReader
ShellCommandReader that reads data from
a file.| Constructor and Description |
|---|
FileShellCommandReader(ShellCommandFactory factory,
ShellContextImpl context,
String filePath)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called by the shell when exiting.
|
boolean |
isBatch() |
void |
open()
Called to open the shell command reader.
|
String |
promptForInput(String prompt)
Prompts the user for some input.
|
String |
promptForPassword(String prompt)
Prompts the user for a password.
|
protected String |
readLine()
Reads a single line from the input source (e.g.
|
getCommandOutput, getContext, getFactory, readpublic FileShellCommandReader(ShellCommandFactory factory, ShellContextImpl context, String filePath)
factory - context - filePath - 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()public boolean isBatch()
isBatch in interface ShellCommandReaderisBatch in class AbstractShellCommandReaderShellCommandReader.isBatch()public String promptForInput(String prompt)
ShellCommandReaderpublic String promptForPassword(String prompt)
ShellCommandReaderCopyright © 2011-2014 JBoss, a division of Red Hat. All Rights Reserved.