org.apache.accumulo.core.client.mock
public class MockShell extends Shell
Shell.Command, Shell.PrintFile, Shell.PrintLine, Shell.PrintShell
Modifier and Type | Field and Description |
---|---|
protected InputStream |
in |
protected Writer |
writer |
CHARSET, commandFactory, commandGrouping, execCommand, execFile, exitCode, instance, iteratorProfiles, log, NO_FIXED_ARG_LENGTH_CHECK, reader, scanIteratorOptions, verbose
helpLongOption, helpOption, tableOption, userOption
Constructor and Description |
---|
MockShell(InputStream in,
Writer writer) |
Modifier and Type | Method and Description |
---|---|
boolean |
config(String... args)
Configures the shell using the provided options.
|
static ByteArrayInputStream |
makeCommands(String... commands)
Convenience method to create the byte-array to hand to the console
|
void |
setConsoleInputStream(InputStream in) |
void |
setConsoleWriter(Writer writer) |
protected void |
setInstance(org.apache.commons.cli.CommandLine cl) |
int |
start() |
checkTableState, execCommand, getConnector, getDefaultPrompt, getExit, getExitCode, getFormatter, getFormatter, getPrincipal, getReader, getTableName, getToken, hasExited, isDebuggingEnabled, isMasking, isVerbose, main, printBinaryRecords, printBinaryRecords, printException, printInfo, printLines, printLines, printRecords, printRecords, printVerboseInfo, readMaskedLine, repeat, resetExitCode, setDebugging, setExit, setLogErrorsToConsole, setTableName, updateUser
protected InputStream in
protected Writer writer
public MockShell(InputStream in, Writer writer) throws IOException
IOException
public boolean config(String... args)
Shell
protected void setInstance(org.apache.commons.cli.CommandLine cl)
setInstance
in class Shell
public int start() throws IOException
start
in class Shell
IOException
public void setConsoleInputStream(InputStream in)
in
- the in to setpublic void setConsoleWriter(Writer writer)
writer
- the writer to setpublic static ByteArrayInputStream makeCommands(String... commands)
commands
- An array of commands to runCopyright © 2015 Apache Accumulo Project. All Rights Reserved.