Class BaseKeyStoreCommand
java.lang.Object
org.elasticsearch.cli.Command
org.elasticsearch.cli.EnvironmentAwareCommand
org.elasticsearch.cli.KeyStoreAwareCommand
org.elasticsearch.common.settings.BaseKeyStoreCommand
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
UpgradeKeyStoreCommand
-
Field Summary
Fields inherited from class org.elasticsearch.cli.KeyStoreAwareCommand
MAX_PASSPHRASE_LENGTHFields inherited from class org.elasticsearch.cli.Command
description, parser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(org.elasticsearch.cli.Terminal terminal, joptsimple.OptionSet options, Environment env)Execute the command with the initializedEnvironment.protected abstract voidexecuteCommand(org.elasticsearch.cli.Terminal terminal, joptsimple.OptionSet options, Environment env)This is called after the keystore password has been read from the stdin and the keystore is decrypted and loaded.protected KeyStoreWrapperprotected SecureStringMethods inherited from class org.elasticsearch.cli.KeyStoreAwareCommand
decryptKeyStore, readPasswordMethods inherited from class org.elasticsearch.cli.EnvironmentAwareCommand
createEnv, createEnv, executeMethods inherited from class org.elasticsearch.cli.Command
addShutdownHook, close, exit, main, printAdditionalHelp
-
Constructor Details
-
BaseKeyStoreCommand
-
-
Method Details
-
execute
protected final void execute(org.elasticsearch.cli.Terminal terminal, joptsimple.OptionSet options, Environment env) throws ExceptionDescription copied from class:EnvironmentAwareCommandExecute the command with the initializedEnvironment.- Specified by:
executein classKeyStoreAwareCommand- Throws:
Exception
-
getKeyStore
-
getKeyStorePassword
-
executeCommand
protected abstract void executeCommand(org.elasticsearch.cli.Terminal terminal, joptsimple.OptionSet options, Environment env) throws ExceptionThis is called after the keystore password has been read from the stdin and the keystore is decrypted and loaded. The keystore and keystore passwords are available to classes extendingBaseKeyStoreCommandusinggetKeyStore()andgetKeyStorePassword()respectively.- Throws:
Exception
-