public abstract class ToolsBase extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ToolsBase.ConnectionOptions
Encapsulates values of connection options.
|
protected static interface |
ToolsBase.ProcessCommand
Interface to be implemented for processing of a command including adding
command specific options, and then processing and executing the command.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AUTH_PROVIDER |
protected static String |
BIND_ADDRESS |
protected static String |
CLIENT_BIND_ADDRESS |
protected static String |
CLIENT_PORT |
protected static String |
CONNECTION_URL |
protected org.apache.commons.cli.Options |
currentOpts |
protected static String |
EXTRA_CONN_PROPS |
protected static String |
LOCATORS |
protected static String |
MCAST_ADDRESS |
protected static String |
MCAST_PORT |
static PrintStream |
outputStream |
protected static String |
PASSWORD |
protected static String |
SYSTEM_PROPERTY |
protected static String |
USERNAME |
| Constructor and Description |
|---|
ToolsBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCommonOptions(org.apache.commons.cli.Options opts) |
protected void |
addConnectionOptions(org.apache.commons.cli.Options opts) |
protected org.apache.commons.cli.Options |
buildCommandOptions(ToolsBase.ProcessCommand processor) |
protected abstract ToolsBase.ProcessCommand |
getCommandProcessor(String cmd)
Get a processor specific to the provided command.
|
protected abstract Map<String,String> |
getCommandToDescriptionKeyMap()
Get the mapping from command-name to its description key that can be used
to lookup the localized description string using
LocalizedResource. |
protected Connection |
getConnection(ToolsBase.ConnectionOptions connOpts,
String cmd,
String cmdDescKey) |
protected abstract String |
getUsageString(String cmd,
String cmdDescKey)
Get the usage string (without any formatting etc.) in case of an exception
or when explicitly requested.
|
protected boolean |
handleCommonOption(GfxdOption opt,
String cmd,
String cmdDescKey) |
protected boolean |
handleConnectionOption(GfxdOption opt,
ToolsBase.ConnectionOptions connOpts) |
protected void |
handleConnectionOptions(ToolsBase.ConnectionOptions connOpts,
String cmd,
String cmdDescKey) |
protected void |
invoke(String[] args) |
protected void |
printUsageExamples(GfxdHelpFormatter formatter,
com.gemstone.gemfire.internal.shared.StringPrintWriter pw,
int width,
String cmd,
String cmdDescKey) |
protected void |
showUsage(String header,
String cmd,
String cmdDescKey) |
protected org.apache.commons.cli.Options currentOpts
public static PrintStream outputStream
protected static final String CONNECTION_URL
protected static final String CLIENT_PORT
protected static final String CLIENT_BIND_ADDRESS
protected static final String MCAST_PORT
protected static final String MCAST_ADDRESS
protected static final String LOCATORS
protected static final String BIND_ADDRESS
protected static final String AUTH_PROVIDER
protected static final String USERNAME
protected static final String PASSWORD
protected static final String EXTRA_CONN_PROPS
protected static final String SYSTEM_PROPERTY
protected void invoke(String[] args)
protected org.apache.commons.cli.Options buildCommandOptions(ToolsBase.ProcessCommand processor)
protected abstract Map<String,String> getCommandToDescriptionKeyMap()
LocalizedResource.protected abstract ToolsBase.ProcessCommand getCommandProcessor(String cmd)
protected abstract String getUsageString(String cmd, String cmdDescKey)
protected void printUsageExamples(GfxdHelpFormatter formatter, com.gemstone.gemfire.internal.shared.StringPrintWriter pw, int width, String cmd, String cmdDescKey)
protected void addConnectionOptions(org.apache.commons.cli.Options opts)
protected void addCommonOptions(org.apache.commons.cli.Options opts)
protected boolean handleCommonOption(GfxdOption opt, String cmd, String cmdDescKey) throws org.apache.commons.cli.ParseException
org.apache.commons.cli.ParseExceptionprotected boolean handleConnectionOption(GfxdOption opt, ToolsBase.ConnectionOptions connOpts)
protected void handleConnectionOptions(ToolsBase.ConnectionOptions connOpts, String cmd, String cmdDescKey)
protected Connection getConnection(ToolsBase.ConnectionOptions connOpts, String cmd, String cmdDescKey) throws SQLException
SQLExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.