public class TestableGfsh extends com.gemstone.gemfire.management.internal.cli.shell.Gfsh implements ShellEvent
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Object |
EXIT_SHELL_COMMAND |
static boolean |
useVirtualTerm |
DEFAULT_APP_COLLECTION_LIMIT, DEFAULT_APP_FETCH_SIZE, DEFAULT_APP_LAST_EXIT_STATUS, DEFAULT_APP_QUERY_RESULTS_DISPLAY_MODE, DEFAULT_APP_QUIET_EXECUTION, ENV_APP_COLLECTION_LIMIT, ENV_APP_CONTEXT_PATH, ENV_APP_FETCH_SIZE, ENV_APP_LAST_EXIT_STATUS, ENV_APP_LOG_FILE, ENV_APP_LOGGING_ENABLED, ENV_APP_NAME, ENV_APP_PWD, ENV_APP_QUERY_RESULTS_DISPLAY_MODE, ENV_APP_QUIET_EXECUTION, ENV_SYS_CLASSPATH, ENV_SYS_GEMFIRE_DIR, ENV_SYS_HOST_NAME, ENV_SYS_JAVA_VERSION, ENV_SYS_OS, ENV_SYS_OS_LINE_SEPARATOR, ENV_SYS_USER, ENV_SYS_USER_HOME, GFSH_APP_NAME, gfsherr, gfshout, gfshThreadLocal, LINE_INDENT, LINE_SEPARATOR, SSL_ENABLED_CIPHERS, SSL_ENABLED_PROTOCOLS, SSL_KEYSTORE, SSL_KEYSTORE_PASSWORD, SSL_TRUSTSTORE, SSL_TRUSTSTORE_PASSWORD, SUPPORT_MUTLIPLESHELLcompletionKeys, exitShellRequest, inBlockComment, logger, ROO_PROMPT, shellPromptshellStatus, shellStatusListenersCOMMAND_SEP, EOF, NEW_LINE, TAB| Constructor and Description |
|---|
TestableGfsh(java.lang.String name,
boolean launchShell,
java.lang.String[] args) |
| Modifier and Type | Method and Description |
|---|---|
ShellEvent |
addChars(java.lang.String seq) |
void |
addCompletorOutput(java.lang.String buffer,
java.util.List candidates) |
ShellEvent |
addCtrlD() |
ShellEvent |
addCtrlZ() |
protected void |
addError(java.lang.String string,
java.lang.Exception e) |
void |
addOutput(java.lang.String command,
java.lang.Object object) |
static java.util.List<java.lang.Object> |
autoComplete(TestableGfsh shell,
java.lang.String command) |
void |
clearEvents() |
protected jline.ConsoleReader |
createConsoleReader() |
ShellEvent |
end() |
void |
eof() |
static java.lang.Object[] |
execAndLogCommand(TestableGfsh shell,
java.lang.String command,
java.io.PrintWriter commandOutputFile,
boolean useFineLevelForLogging) |
static java.lang.Object[] |
execCommand(TestableGfsh shell,
java.lang.String command,
java.io.PrintWriter commandOutputFile) |
java.util.Map<java.lang.String,java.lang.Object> |
getCommandOutput() |
static java.lang.String[] |
getCommandOutputStrings(TestableGfsh shell) |
java.util.Map<java.lang.String,java.util.List> |
getCompletorOutput() |
java.lang.String |
getError() |
protected org.springframework.shell.core.ExecutionStrategy |
getExecutionStrategy() |
java.lang.String |
getOutputText() |
protected org.springframework.shell.core.Parser |
getParser() |
java.lang.String |
getPlainOutputText() |
java.lang.String |
getShellName() |
protected void |
handleExecutionResult(java.lang.Object result) |
boolean |
hasError() |
ShellEvent |
newline() |
void |
notifyDisconnect(java.lang.String endPoints) |
void |
run()
Following code is copied from JLineShell of spring shell
to manipulate consoleReader.
|
void |
setTimeout(long timeout) |
static void |
setVirtualTerminal(boolean yes) |
void |
stop() |
ShellEvent |
tab() |
void |
terminate() |
static java.lang.String |
toHexString(byte[] array) |
void |
waitForOutput() |
add, add, executeCommand, executeScript, findResources, getBanner, getCommandNames, getConsoleReader, getCurrentInstance, getDebug, getEnv, getEnvProperty, getGfshConfig, getGfshHistory, getHistoryFileName, getInstance, getLastExecutionStatus, getLogFilePath, getOperationInvoker, getProductName, getPromptText, getSignalHandler, getTerminalHeight, getTerminalWidth, getVersion, getVersion, getWelcomeMessage, interact, isConnectedAndReady, isHeadlessMode, isLoggingEnabled, isQuietMode, logCommandToOutput, logInfo, logSevere, logToFile, logWarning, obtainHelp, obtainHelpCommandNames, print, printAsInfo, printAsSevere, printAsWarning, printBannerAndWelcome, println, println, printlnErr, promptLoop, readWithMask, redirectInternalJavaLoggers, setDebug, setEnvProperty, setLastExecutionStatus, setOperationInvoker, setPromptPath, start, versionInfo, waitForComplete, wrapTextcloseShell, createAnsiWindowsReader, flash, getHistorySize, getHomeAsString, getStartupNotifications, isDevelopmentMode, setDevelopmentMode, setHistorySize, setPromptPathblockCommentBegin, blockCommentFinish, date, executeScriptLine, flashCustom, getExitShellRequest, getHome, getShellPrompt, inlineComment, logCommandIfRequired, props, script, versionaddShellStatusListener, getShellStatus, removeShellStatusListener, setShellStatus, setShellStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected static final java.lang.Object EXIT_SHELL_COMMAND
public static boolean useVirtualTerm
public TestableGfsh(java.lang.String name,
boolean launchShell,
java.lang.String[] args)
throws java.lang.ClassNotFoundException,
java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic void setTimeout(long timeout)
public static void setVirtualTerminal(boolean yes)
protected void addError(java.lang.String string,
java.lang.Exception e)
public void addCompletorOutput(java.lang.String buffer,
java.util.List candidates)
protected org.springframework.shell.core.ExecutionStrategy getExecutionStrategy()
getExecutionStrategy in class com.gemstone.gemfire.management.internal.cli.shell.Gfshprotected jline.ConsoleReader createConsoleReader()
createConsoleReader in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic void run()
run in interface java.lang.Runnablerun in class org.springframework.shell.core.JLineShellpublic java.lang.String getShellName()
getShellName in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic ShellEvent tab() throws java.io.IOException
tab in interface ShellEventjava.io.IOExceptionpublic ShellEvent addChars(java.lang.String seq) throws java.io.IOException
addChars in interface ShellEventjava.io.IOExceptionpublic ShellEvent addCtrlZ() throws java.io.IOException
addCtrlZ in interface ShellEventjava.io.IOExceptionpublic ShellEvent addCtrlD() throws java.io.IOException
addCtrlD in interface ShellEventjava.io.IOExceptionpublic ShellEvent newline() throws java.io.IOException
newline in interface ShellEventjava.io.IOExceptionpublic ShellEvent end()
end in interface ShellEventpublic void eof()
eof in interface ShellEventpublic void terminate()
terminate in interface ShellEventpublic void stop()
stop in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic void notifyDisconnect(java.lang.String endPoints)
notifyDisconnect in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic java.lang.String getOutputText()
public java.lang.String getPlainOutputText()
public static java.lang.String toHexString(byte[] array)
public void clearEvents()
clearEvents in interface ShellEventpublic java.util.Map<java.lang.String,java.lang.Object> getCommandOutput()
public java.util.Map<java.lang.String,java.util.List> getCompletorOutput()
public void addOutput(java.lang.String command,
java.lang.Object object)
public void waitForOutput()
waitForOutput in interface ShellEventprotected void handleExecutionResult(java.lang.Object result)
handleExecutionResult in class com.gemstone.gemfire.management.internal.cli.shell.Gfshprotected org.springframework.shell.core.Parser getParser()
getParser in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic boolean hasError()
public java.lang.String getError()
public static java.util.List<java.lang.Object> autoComplete(TestableGfsh shell, java.lang.String command)
public static java.lang.Object[] execAndLogCommand(TestableGfsh shell, java.lang.String command, java.io.PrintWriter commandOutputFile, boolean useFineLevelForLogging)
public static java.lang.Object[] execCommand(TestableGfsh shell, java.lang.String command, java.io.PrintWriter commandOutputFile)
public static java.lang.String[] getCommandOutputStrings(TestableGfsh shell)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.