public class CommandHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIRM_MSG |
GridConsole |
console
Console instance.
|
static String |
DELIM |
static int |
ERR_AUTHENTICATION_FAILED |
static int |
EXIT_CODE_CONNECTION_FAILED |
static int |
EXIT_CODE_ILLEGAL_STATE_ERROR |
static int |
EXIT_CODE_INVALID_ARGUMENTS |
static int |
EXIT_CODE_OK |
static int |
EXIT_CODE_UNEXPECTED_ERROR |
protected Logger |
logger
JULs logger.
|
static String |
NULL |
protected String |
ses
Session.
|
static String |
UTILITY_NAME
Utility name.
|
| Constructor and Description |
|---|
CommandHandler() |
CommandHandler(Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
int |
execute(List<String> rawArgs)
Parse and execute command.
|
<T> T |
getLastOperationResult()
Used for tests.
|
static Logger |
initLogger(@Nullable String loggerName)
Initialises JULs logger with basic settings
|
static boolean |
isAuthError(Throwable e) |
protected boolean |
isSensitiveArgument(String arg) |
static void |
main(String[] args) |
protected ConnectionAndSslParameters |
parseAndValidate(List<String> rawArgs) |
protected void |
printCommandsUsage()
Print commands usage.
|
static StreamHandler |
setupStreamHandler() |
protected String |
utilityName() |
public static final String CONFIRM_MSG
public static final String DELIM
public static final int EXIT_CODE_OK
public static final int EXIT_CODE_INVALID_ARGUMENTS
public static final int EXIT_CODE_CONNECTION_FAILED
public static final int ERR_AUTHENTICATION_FAILED
public static final int EXIT_CODE_UNEXPECTED_ERROR
public static final int EXIT_CODE_ILLEGAL_STATE_ERROR
public static final String UTILITY_NAME
public static final String NULL
protected final Logger logger
protected final String ses
public GridConsole console
public CommandHandler()
public CommandHandler(Logger logger)
logger - Logger to use.public static void main(String[] args)
args - Arguments to parse and apply.public static StreamHandler setupStreamHandler()
public static Logger initLogger(@Nullable @Nullable String loggerName)
loggerName - logger name. If null anonymous logger is returned.protected void printCommandsUsage()
protected ConnectionAndSslParameters parseAndValidate(List<String> rawArgs)
rawArgs - Arguments to parse.public int execute(List<String> rawArgs)
rawArgs - Arguments to parse and execute.protected boolean isSensitiveArgument(String arg)
arg - To check.public <T> T getLastOperationResult()
public static boolean isAuthError(Throwable e)
e - Exception to check.true if specified exception is GridClientAuthenticationException.protected String utilityName()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.29 Release Date : January 8 2026