Class SSLSocketProviderDependenciesBuilder
- java.lang.Object
-
- com.tangosol.coherence.config.builder.SSLSocketProviderDependenciesBuilder
-
- All Implemented Interfaces:
ParameterizedBuilder<com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies>
public class SSLSocketProviderDependenciesBuilder extends Object implements ParameterizedBuilder<com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies>
SSLSocketProviderDependenciesBuilder
enables lazy instantiation of SSL SocketProvider.This builder includes methods that allows one to specify whether to get a datagram or demultiplexed
SocketProvider
and what subport to use for the socketprovider.- Since:
- Coherence 12.2.1.1
- Author:
- jf 2015.11.11, Jonathan Knight 2022.01.25
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SSLSocketProviderDependenciesBuilder.DependenciesAware
Implemented byProvider
classes that need to be aware of the SSL dependencies.static class
SSLSocketProviderDependenciesBuilder.HostnameVerifierBuilder
HostnameVerifier dependenciesstatic class
SSLSocketProviderDependenciesBuilder.NameListDependencies
SSL encipher-suites and protocol-versions are both a list of names with a usage attribute of the value "white-list" or "black-list"static class
SSLSocketProviderDependenciesBuilder.ProviderBuilder
Provider dependencies-
Nested classes/interfaces inherited from interface com.tangosol.coherence.config.builder.ParameterizedBuilder
ParameterizedBuilder.ReflectionSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACTION_ALLOW
The value of the hostname-verifier action to allow all connections.static String
NAME
The name of the Coherence provider.static Seconds
NO_REFRESH
The default auto-refresh period - no refresh.static String
SERVICE_TYPE
The type of the SSLContext service.
-
Constructor Summary
Constructors Constructor Description SSLSocketProviderDependenciesBuilder(com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies deps)
ConstructsSSLSocketProviderDependenciesBuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterizedBuilder<HostnameVerifier>
getHostnameVerifierBuilder()
Get customized HostnameVerifierBuildercom.tangosol.internal.net.ssl.ManagerDependencies
getIdentityManager()
Get the SSL identity manager dependenciesString
getProtocol()
Get the SSL protocol nameSSLSocketProviderDependenciesBuilder.ProviderBuilder
getProviderBuilder()
Get the SSL provider builder.protected String
getProviderName()
Returns the SSL provider name.Seconds
getRefreshPeriod()
Return the period to use to auto-refresh keys and certs.RefreshPolicy
getRefreshPolicy()
Returns theRefreshPolicy
to use to determine whether keys and certs should be refreshed.SocketProviderBuilder
getSocketProviderBuilder()
Get delegate socket provider buildercom.tangosol.internal.net.ssl.ManagerDependencies
getTrustManager()
Get the SSL trust managercom.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies
realize()
Realize a SSLSocketProviderDefaultDependencies based on configured/defaulted values for config element ssl.com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies
realize(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)
RealizeSSLSocketProviderDefaultDependencies
from this builderprotected Provider
realizeProvider()
Realize the SSL provider.void
setCipherSuitesNameList(SSLSocketProviderDependenciesBuilder.NameListDependencies deps)
Set cipher-suites dependenciesvoid
setClientAuth(String sAuthMode)
Set the client auth mode to use.void
setDelegate(SocketProviderBuilder bldr)
Set delegate SocketProviderBuildervoid
setExecutor(ParameterizedBuilder<Executor> bldr)
Set SSL executors builder.void
setHostnameVerifierBuilder(ParameterizedBuilder<HostnameVerifier> bldr)
Set the customized HostnameVerifierBuildervoid
setIdentityManager(com.tangosol.internal.net.ssl.DefaultManagerDependencies deps)
Set the SSL identity manager dependencies.void
setProtocol(String sName)
Set the SSL protocol namevoid
setProtocolVersionsNameList(SSLSocketProviderDependenciesBuilder.NameListDependencies deps)
Set protocol-versions dependenciesvoid
setProviderBuilder(SSLSocketProviderDependenciesBuilder.ProviderBuilder builder)
Set the SSL provider builder.void
setRefreshPeriod(Seconds refreshPeriod)
Set the auto-refresh period.void
setRefreshPolicy(RefreshPolicy policy)
Set theRefreshPolicy
to use to determine whether keys and certs should be refreshed.void
setTrustManager(com.tangosol.internal.net.ssl.ManagerDependencies deps)
Set the SSL trust manager
-
-
-
Field Detail
-
NAME
public static final String NAME
The name of the Coherence provider.- See Also:
- Constant Field Values
-
SERVICE_TYPE
public static final String SERVICE_TYPE
The type of the SSLContext service.- See Also:
- Constant Field Values
-
ACTION_ALLOW
public static final String ACTION_ALLOW
The value of the hostname-verifier action to allow all connections.- See Also:
- Constant Field Values
-
NO_REFRESH
public static final Seconds NO_REFRESH
The default auto-refresh period - no refresh.
-
-
Constructor Detail
-
SSLSocketProviderDependenciesBuilder
public SSLSocketProviderDependenciesBuilder(com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies deps)
ConstructsSSLSocketProviderDependenciesBuilder
- Parameters:
deps
-SSLSocketProviderDefaultDependencies
defaults for cluster
-
-
Method Detail
-
setProtocol
@Injectable("protocol") public void setProtocol(String sName)
Set the SSL protocol name- Parameters:
sName
- the protocol name
-
getProtocol
public String getProtocol()
Get the SSL protocol name- Returns:
- protocol name
-
setProviderBuilder
@Injectable("provider") public void setProviderBuilder(SSLSocketProviderDependenciesBuilder.ProviderBuilder builder)
Set the SSL provider builder.- Parameters:
builder
- SSL provider builder
-
getProviderBuilder
public SSLSocketProviderDependenciesBuilder.ProviderBuilder getProviderBuilder()
Get the SSL provider builder.- Returns:
- the provider builder
-
realizeProvider
protected Provider realizeProvider()
Realize the SSL provider.- Returns:
- the SSL provider
-
getProviderName
protected String getProviderName()
Returns the SSL provider name.- Returns:
- the SSL provider name
-
setExecutor
@Injectable("executor") public void setExecutor(ParameterizedBuilder<Executor> bldr)
Set SSL executors builder.- Parameters:
bldr
- builder for SSL executors.
-
setIdentityManager
@Injectable("identity-manager") public void setIdentityManager(com.tangosol.internal.net.ssl.DefaultManagerDependencies deps)
Set the SSL identity manager dependencies.- Parameters:
deps
- configured or defaulted values for identity manager dependencies
-
getIdentityManager
public com.tangosol.internal.net.ssl.ManagerDependencies getIdentityManager()
Get the SSL identity manager dependencies- Returns:
- identity manager configured/defaulted values
-
getTrustManager
public com.tangosol.internal.net.ssl.ManagerDependencies getTrustManager()
Get the SSL trust manager- Returns:
- the trust manager
-
setTrustManager
@Injectable("trust-manager") public void setTrustManager(com.tangosol.internal.net.ssl.ManagerDependencies deps)
Set the SSL trust manager- Parameters:
deps
- trust manager configured/defaulted values
-
setHostnameVerifierBuilder
@Injectable("hostname-verifier") public void setHostnameVerifierBuilder(ParameterizedBuilder<HostnameVerifier> bldr)
Set the customized HostnameVerifierBuilder- Parameters:
bldr
- HostnameVerifierBuilder
-
getHostnameVerifierBuilder
public ParameterizedBuilder<HostnameVerifier> getHostnameVerifierBuilder()
Get customized HostnameVerifierBuilder- Returns:
HostnameVerifier
or null
-
setCipherSuitesNameList
@Injectable("cipher-suites") public void setCipherSuitesNameList(SSLSocketProviderDependenciesBuilder.NameListDependencies deps)
Set cipher-suites dependencies- Parameters:
deps
- cipher-suites config info
-
setProtocolVersionsNameList
@Injectable("protocol-versions") public void setProtocolVersionsNameList(SSLSocketProviderDependenciesBuilder.NameListDependencies deps)
Set protocol-versions dependencies- Parameters:
deps
- protocol-versions config info
-
setDelegate
@Injectable("socket-provider") public void setDelegate(SocketProviderBuilder bldr)
Set delegate SocketProviderBuilder- Parameters:
bldr
- delegate socket provider builder
-
setClientAuth
@Injectable("client-auth") public void setClientAuth(String sAuthMode)
Set the client auth mode to use.- Parameters:
sAuthMode
- the client auth mode to use
-
setRefreshPeriod
@Injectable("refresh-period") public void setRefreshPeriod(Seconds refreshPeriod)
Set the auto-refresh period.- Parameters:
refreshPeriod
- the period to use to auto-refresh keys and certs
-
getRefreshPeriod
public Seconds getRefreshPeriod()
Return the period to use to auto-refresh keys and certs.- Returns:
- the period to use to auto-refresh keys and certs
-
setRefreshPolicy
@Injectable("refresh-policy") public void setRefreshPolicy(RefreshPolicy policy)
Set theRefreshPolicy
to use to determine whether keys and certs should be refreshed.- Parameters:
policy
- theRefreshPolicy
to use
-
getRefreshPolicy
public RefreshPolicy getRefreshPolicy()
Returns theRefreshPolicy
to use to determine whether keys and certs should be refreshed.- Returns:
- the
RefreshPolicy
to use
-
getSocketProviderBuilder
public SocketProviderBuilder getSocketProviderBuilder()
Get delegate socket provider builder- Returns:
- socket provider builder
-
realize
public com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies realize()
Realize a SSLSocketProviderDefaultDependencies based on configured/defaulted values for config element ssl.Note: unlike typical builders, this is realized once, since sensitive password data is nullified after realizing.
- Returns:
SSLSocketProviderDefaultDependencies
-
realize
public com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies realize(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)
RealizeSSLSocketProviderDefaultDependencies
from this builder- Specified by:
realize
in interfaceParameterizedBuilder<com.tangosol.internal.net.ssl.SSLSocketProviderDefaultDependencies>
- Parameters:
resolver
- a resolverloader
- class loaderlistParameters
- parameter list- Returns:
- SSLSocketProviderDefaultDependencies
-
-