public class UnknownCommand extends Object implements Command
CommandFactory
when the command is not known, as it is supposed to always
return a valid Command object.| Constructor and Description |
|---|
UnknownCommand(String command) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the shell.
|
void |
setErrorStream(OutputStream err)
Set the error stream that can be used by the shell to write its errors.
|
void |
setExitCallback(ExitCallback callback)
Set the callback that the shell has to call when it is closed.
|
void |
setInputStream(InputStream in)
Set the input stream that can be used by the shell to read input.
|
void |
setOutputStream(OutputStream out)
Set the output stream that can be used by the shell to write its output.
|
void |
start(Environment env)
Starts the shell.
|
public UnknownCommand(String command)
public void setInputStream(InputStream in)
CommandsetInputStream in interface Commandin - The InputStream used by the shell to read input.public void setOutputStream(OutputStream out)
CommandsetOutputStream in interface Commandout - The OutputStream used by the shell to write its outputpublic void setErrorStream(OutputStream err)
CommandsetErrorStream in interface Commanderr - The OutputStream used by the shell to write its errorspublic void setExitCallback(ExitCallback callback)
CommandsetExitCallback in interface Commandcallback - The ExitCallback to call when shell is closedpublic void start(Environment env) throws IOException
Command
Thread(this).start();
start in interface Commandenv - The EnvironmentIOException - If failed to startCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.