public static final class CommandCredentialSource.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
CommandCredentialSource.Builder |
addCommand(Consumer<Consumer<String>> consumer)
Add a command string provider to the list of command strings.
|
CommandCredentialSource.Builder |
addCommand(String commandString)
Add a command string to the list of command strings.
|
CommandCredentialSource.Builder |
addCommand(Supplier<String> commandStringSupplier)
Add a command string supplier result to the list of command strings.
|
CommandCredentialSource.Builder |
addEnvironment(Consumer<BiConsumer<String,String>> consumer)
Add multiple environment values to the process environment.
|
CommandCredentialSource.Builder |
addEnvironment(String key,
String value)
Add an environment value to the process environment.
|
CommandCredentialSource |
build()
Construct the credential source instance.
|
CommandCredentialSource.Builder |
removeEnvironment(String key)
Remove an environment variable from the process environment.
|
CommandCredentialSource.Builder |
setOutputCharset(Charset charset)
Set the output character set (encoding) to expect from the process.
|
CommandCredentialSource.Builder |
setPasswordFactoryProvider(Provider provider)
Set the provider to use to find the password factory.
|
CommandCredentialSource.Builder |
setWorkingDirectory(File directory)
Set the working directory of the target process.
|
public CommandCredentialSource.Builder addCommand(String commandString)
commandString - the literal string to add (must not be null)public CommandCredentialSource.Builder addCommand(Supplier<String> commandStringSupplier)
null or
an empty string, no string is added at that time. The supplier is evaluated every time a command is run.commandStringSupplier - the string supplier to get the string from (must not be null)public CommandCredentialSource.Builder addCommand(Consumer<Consumer<String>> consumer)
null or empty strings.consumer - the consumer which can provide the command strings to add (must not be null)public CommandCredentialSource.Builder addEnvironment(String key, String value)
key - the environment variable name (must not be null)value - the environment variable value (must not be null)public CommandCredentialSource.Builder addEnvironment(Consumer<BiConsumer<String,String>> consumer)
consumer - a consumer which can provide key-value pairs to add to the environment (must not be null)public CommandCredentialSource.Builder removeEnvironment(String key)
key - the environment variable name (must not be null)public CommandCredentialSource.Builder setWorkingDirectory(File directory)
directory - the directory (must not be null)public CommandCredentialSource.Builder setPasswordFactoryProvider(Provider provider)
provider - the provider to use (must not be null)public CommandCredentialSource.Builder setOutputCharset(Charset charset)
charset - the character set to use (must not be null)public CommandCredentialSource build() throws GeneralSecurityException
GeneralSecurityException - if there was a failure constructing the password factoryCopyright © 2018 JBoss by Red Hat. All rights reserved.