public class TestableGfsh extends com.gemstone.gemfire.management.internal.cli.shell.Gfsh implements ShellEvent
| Modifier and Type | Field and Description |
|---|---|
protected static 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(String name,
boolean launchShell,
String[] args) |
| Modifier and Type | Method and Description |
|---|---|
ShellEvent |
addChars(String seq) |
void |
addCompletorOutput(String buffer,
List candidates) |
ShellEvent |
addCtrlD() |
ShellEvent |
addCtrlZ() |
protected void |
addError(String string,
Exception e) |
void |
addOutput(String command,
Object object) |
static List<Object> |
autoComplete(TestableGfsh shell,
String command) |
void |
clearEvents() |
protected jline.ConsoleReader |
createConsoleReader() |
ShellEvent |
end() |
void |
eof() |
static Object[] |
execAndLogCommand(TestableGfsh shell,
String command,
PrintWriter commandOutputFile,
boolean useFineLevelForLogging) |
static Object[] |
execCommand(TestableGfsh shell,
String command,
PrintWriter commandOutputFile) |
Map<String,Object> |
getCommandOutput() |
static String[] |
getCommandOutputStrings(TestableGfsh shell) |
Map<String,List> |
getCompletorOutput() |
String |
getError() |
protected org.springframework.shell.core.ExecutionStrategy |
getExecutionStrategy() |
String |
getOutputText() |
protected org.springframework.shell.core.Parser |
getParser() |
String |
getPlainOutputText() |
String |
getShellName() |
protected void |
handleExecutionResult(Object result) |
boolean |
hasError() |
ShellEvent |
newline() |
void |
notifyDisconnect(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 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 Object EXIT_SHELL_COMMAND
public static boolean useVirtualTerm
public TestableGfsh(String name, boolean launchShell, String[] args) throws ClassNotFoundException, IOException
ClassNotFoundExceptionIOExceptionpublic void setTimeout(long timeout)
public static void setVirtualTerminal(boolean yes)
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()
public String getShellName()
getShellName in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic ShellEvent tab() throws IOException
tab in interface ShellEventIOExceptionpublic ShellEvent addChars(String seq) throws IOException
addChars in interface ShellEventIOExceptionpublic ShellEvent addCtrlZ() throws IOException
addCtrlZ in interface ShellEventIOExceptionpublic ShellEvent addCtrlD() throws IOException
addCtrlD in interface ShellEventIOExceptionpublic ShellEvent newline() throws IOException
newline in interface ShellEventIOExceptionpublic 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(String endPoints)
notifyDisconnect in class com.gemstone.gemfire.management.internal.cli.shell.Gfshpublic String getOutputText()
public String getPlainOutputText()
public static String toHexString(byte[] array)
public void clearEvents()
clearEvents in interface ShellEventpublic void waitForOutput()
waitForOutput in interface ShellEventprotected void handleExecutionResult(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 String getError()
public static List<Object> autoComplete(TestableGfsh shell, String command)
public static Object[] execAndLogCommand(TestableGfsh shell, String command, PrintWriter commandOutputFile, boolean useFineLevelForLogging)
public static Object[] execCommand(TestableGfsh shell, String command, PrintWriter commandOutputFile)
public static String[] getCommandOutputStrings(TestableGfsh shell)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.