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 OutputStream |
out |
protected Writer |
writer
Deprecated.
since 1.6.0; use out
|
CHARSET, commandFactory, commandGrouping, COMMENT_PREFIX, execCommand, execFile, exitCode, HISTORY_DIR_NAME, HISTORY_FILE_NAME, instance, iteratorProfiles, log, NO_FIXED_ARG_LENGTH_CHECK, reader, scanIteratorOptions, verbose
helpLongOption, helpOption, namespaceOption, tableOption, userOption
Constructor and Description |
---|
MockShell(InputStream in,
OutputStream out) |
MockShell(InputStream in,
Writer out)
Deprecated.
since 1.6.0; use OutputStream version
|
Modifier and Type | Method and Description |
---|---|
boolean |
config(String... args)
Configures the shell using the provided options.
|
ClassLoader |
getClassLoader(org.apache.commons.cli.CommandLine cl,
Shell shellState) |
static ByteArrayInputStream |
makeCommands(String... commands)
Convenience method to create the byte-array to hand to the console
|
void |
setConsoleInputStream(InputStream in) |
void |
setConsoleWriter(OutputStream out) |
void |
setConsoleWriter(Writer out)
Deprecated.
since 1.6.0; use the OutputStream version
|
protected void |
setInstance(org.apache.commons.cli.CommandLine cl)
Deprecated.
since 1.6.0; use ShellOptionsJC version
|
protected void |
setInstance(ShellOptionsJC options)
Sets the instance used by the shell based on the given options.
|
int |
start() |
checkTableState, execCommand, getConnector, getDefaultPrompt, getExit, getExitCode, getFormatter, getFormatter, getInstance, getPrincipal, getReader, getTableName, getToken, hasExited, isDebuggingEnabled, isMasking, isTabCompletion, isVerbose, main, printBinaryRecords, printBinaryRecords, printException, printInfo, printLines, printLines, printRecords, printRecords, printVerboseInfo, readMaskedLine, repeat, resetExitCode, setDebugging, setExit, setLogErrorsToConsole, setTableName, shutdown, updateUser
protected InputStream in
protected OutputStream out
@Deprecated protected Writer writer
public MockShell(InputStream in, OutputStream out) throws IOException
IOException
@Deprecated public MockShell(InputStream in, Writer out) throws IOException
IOException
public boolean config(String... args)
Shell
protected void setInstance(ShellOptionsJC options)
Shell
setInstance
in class Shell
options
- shell options@Deprecated protected void setInstance(org.apache.commons.cli.CommandLine cl)
public int start() throws IOException
start
in class Shell
IOException
public void setConsoleInputStream(InputStream in)
in
- the in to setpublic void setConsoleWriter(OutputStream out)
out
- the output stream to set@Deprecated public void setConsoleWriter(Writer out)
public ClassLoader getClassLoader(org.apache.commons.cli.CommandLine cl, Shell shellState) throws AccumuloException, TableNotFoundException, AccumuloSecurityException, IOException, org.apache.commons.vfs2.FileSystemException
getClassLoader
in class Shell
AccumuloException
TableNotFoundException
AccumuloSecurityException
IOException
org.apache.commons.vfs2.FileSystemException
public static ByteArrayInputStream makeCommands(String... commands)
commands
- An array of commands to runCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.