public abstract class AbstractShellCommandReader extends Object implements ShellCommandReader
| Constructor and Description |
|---|
AbstractShellCommandReader(ShellCommandFactory factory,
ShellContext 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.
|
ShellContext |
getContext() |
ShellCommandFactory |
getFactory() |
abstract void |
open()
Called to open the shell command reader.
|
ShellCommand |
read()
Reads the next command from the input source.
|
protected abstract String |
readLine()
Reads a single line from the input source (e.g.
|
public AbstractShellCommandReader(ShellCommandFactory factory, ShellContext context)
factory - context - public abstract void open()
throws IOException
ShellCommandReaderopen in interface ShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.ShellCommandReader#open()public final ShellCommand read() throws Exception
ShellCommandReaderread in interface ShellCommandReaderExceptionorg.overlord.sramp.common.shell.ShellCommandReader#read()protected Writer getCommandOutput()
protected abstract String readLine() throws IOException
IOExceptionpublic void close()
throws IOException
ShellCommandReaderclose in interface ShellCommandReaderIOExceptionorg.overlord.sramp.common.shell.ShellCommandReader#close()public ShellCommandFactory getFactory()
public ShellContext getContext()
Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.