Module io.helidon.common.pki
Package io.helidon.common.pki
Class PemKeys.BuilderBase<BUILDER extends PemKeys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends PemKeys>
java.lang.Object
io.helidon.common.pki.PemKeys.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER- type of the builder extending this abstract builderPROTOTYPE- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
PemKeys.Builder
- Enclosing interface:
PemKeys
public abstract static class PemKeys.BuilderBase<BUILDER extends PemKeys.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends PemKeys>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
PemKeys.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoad certificate chain from PEM resource.Load certificate chain from PEM resource.certChain(ResourceConfig certChain) Load certificate chain from PEM resource.certChain(Consumer<ResourceConfig.Builder> consumer) Load certificate chain from PEM resource.Load certificate chain from PEM resource.Read one or more certificates in PEM format from a resource definition.certificates(Resource certificates) Read one or more certificates in PEM format from a resource definition.certificates(ResourceConfig certificates) Read one or more certificates in PEM format from a resource definition.certificates(Consumer<ResourceConfig.Builder> consumer) Read one or more certificates in PEM format from a resource definition.certificates(Supplier<? extends Resource> supplier) Read one or more certificates in PEM format from a resource definition.Clear existing value of certChain.Clear existing value of certificates.clearKey()Clear existing value of key.Clear existing value of keyPassphrase.Clear existing value of publicKey.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).Update this builder from an existing prototype instance.from(PemKeys.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.key()Read a private key from PEM format from a resource definition.Read a private key from PEM format from a resource definition.key(ResourceConfig key) Read a private key from PEM format from a resource definition.key(Consumer<ResourceConfig.Builder> consumer) Read a private key from PEM format from a resource definition.Read a private key from PEM format from a resource definition.Optional<char[]> Passphrase for private key.keyPassphrase(char[] keyPassphrase) Passphrase for private key.keyPassphrase(String keyPassphrase) Passphrase for private key.protected voidHandles providers and decorators.Read a public key from PEM format from a resource definition.Read a public key from PEM format from a resource definition.publicKey(ResourceConfig publicKey) Read a public key from PEM format from a resource definition.publicKey(Consumer<ResourceConfig.Builder> consumer) Read a public key from PEM format from a resource definition.Read a public key from PEM format from a resource definition.toString()protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends PemKeys.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PemKeys> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends PemKeys.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends PemKeys> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
clearKey
Clear existing value of key.- Returns:
- updated builder instance
- See Also:
-
key
Read a private key from PEM format from a resource definition.- Parameters:
key- key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
key
Read a private key from PEM format from a resource definition.- Parameters:
key- prototype of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
key
Read a private key from PEM format from a resource definition.- Parameters:
consumer- consumer of builder of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
key
Read a private key from PEM format from a resource definition.- Parameters:
supplier- supplier of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearKeyPassphrase
Clear existing value of keyPassphrase.- Returns:
- updated builder instance
- See Also:
-
keyPassphrase
Passphrase for private key. If the key is encrypted (and in PEM PKCS#8 format), this passphrase will be used to decrypt it.- Parameters:
keyPassphrase- passphrase used to encrypt the private key- Returns:
- updated builder instance
- See Also:
-
keyPassphrase
Passphrase for private key. If the key is encrypted (and in PEM PKCS#8 format), this passphrase will be used to decrypt it.- Parameters:
keyPassphrase- passphrase used to encrypt the private key- Returns:
- updated builder instance
- See Also:
-
clearPublicKey
Clear existing value of publicKey.- Returns:
- updated builder instance
- See Also:
-
publicKey
Read a public key from PEM format from a resource definition.- Parameters:
publicKey- public key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
publicKey
Read a public key from PEM format from a resource definition.- Parameters:
publicKey- prototype of public key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
publicKey
Read a public key from PEM format from a resource definition.- Parameters:
consumer- consumer of builder of public key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
publicKey
Read a public key from PEM format from a resource definition.- Parameters:
supplier- supplier of public key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearCertChain
Clear existing value of certChain.- Returns:
- updated builder instance
- See Also:
-
certChain
Load certificate chain from PEM resource.- Parameters:
certChain- resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certChain
Load certificate chain from PEM resource.- Parameters:
certChain- prototype of resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certChain
Load certificate chain from PEM resource.- Parameters:
consumer- consumer of builder of resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certChain
Load certificate chain from PEM resource.- Parameters:
supplier- supplier of resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearCertificates
Clear existing value of certificates.- Returns:
- updated builder instance
- See Also:
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Parameters:
certificates- key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Parameters:
certificates- prototype of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Parameters:
consumer- consumer of builder of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Parameters:
supplier- supplier of key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
key
Read a private key from PEM format from a resource definition.- Returns:
- key resource (file, classpath, URL etc.)
-
keyPassphrase
Passphrase for private key. If the key is encrypted (and in PEM PKCS#8 format), this passphrase will be used to decrypt it.- Returns:
- passphrase used to encrypt the private key
-
publicKey
Read a public key from PEM format from a resource definition.- Returns:
- public key resource (file, classpath, URL etc.)
-
certChain
Load certificate chain from PEM resource.- Returns:
- resource (e.g. classpath, file path, URL etc.)
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Returns:
- key resource (file, classpath, URL etc.)
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)