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> Prototype.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 Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
PemKeys
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLoad certificate chain from PEM resource.Load certificate chain from PEM resource.certChain
(ResourceConfig certChainConfig) Load certificate chain from PEM resource.certChain
(Consumer<ResourceConfig.Builder> consumer) 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 certificatesConfig) 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.Clear existing value of this property.Clear existing value of this property.clearKey()
Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.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 keyConfig) 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.Optional
<char[]> Passphrase for private key.keyPassphrase
(char[] keyPassphrase) Passphrase for private key.keyPassphrase
(String keyPassphrase) Passphrase for private key.protected void
Handles 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 publicKeyConfig) 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.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
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
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.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 this property.- 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:
keyConfig
- 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
- key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearKeyPassphrase
Clear existing value of this property.- 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 this property.- 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:
publicKeyConfig
- 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
- public key resource (file, classpath, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearCertChain
Clear existing value of this property.- 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:
certChainConfig
- resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
certChain
Load certificate chain from PEM resource.- Parameters:
consumer
- resource (e.g. classpath, file path, URL etc.)- Returns:
- updated builder instance
- See Also:
-
clearCertificates
Clear existing value of this property.- 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:
certificatesConfig
- 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
- 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:
- the key
-
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:
- the key passphrase
-
publicKey
Read a public key from PEM format from a resource definition.- Returns:
- the public key
-
certChain
Load certificate chain from PEM resource.- Returns:
- the cert chain
-
certificates
Read one or more certificates in PEM format from a resource definition. Used eg: in a trust store.- Returns:
- the certificates
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-