|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.util.jsse.JsseParameters
org.apache.camel.util.jsse.BaseSSLContextParameters
org.apache.camel.util.jsse.SSLContextParameters
public class SSLContextParameters
Represents SSLContext configuration options used in instantiating an
SSLContext instance.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.camel.util.jsse.BaseSSLContextParameters |
|---|
BaseSSLContextParameters.SSLContextDecorator, BaseSSLContextParameters.SSLContextSpiDecorator, BaseSSLContextParameters.SSLServerSocketFactoryDecorator, BaseSSLContextParameters.SSLSocketFactoryDecorator |
| Field Summary | |
|---|---|
protected static String |
DEFAULT_SECURE_SOCKET_PROTOCOL
|
| Fields inherited from class org.apache.camel.util.jsse.BaseSSLContextParameters |
|---|
DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE, DEFAULT_CIPHER_SUITES_FILTER_INCLUDE, DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE |
| Constructor Summary | |
|---|---|
SSLContextParameters()
|
|
| Method Summary | |
|---|---|
protected void |
configureSSLContext(SSLContext context)
Configures the actual SSLContext itself with direct setter calls. |
SSLContext |
createSSLContext()
Creates an SSLContext based on the related configuration options
of this instance. |
String |
getCertAlias()
|
SSLContextClientParameters |
getClientParameters()
|
KeyManagersParameters |
getKeyManagers()
|
String |
getProvider()
|
SecureRandomParameters |
getSecureRandom()
|
String |
getSecureSocketProtocol()
|
SSLContextServerParameters |
getServerParameters()
|
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> |
getSSLEngineConfigurers(SSLContext context)
Returns the list of configurers to apply to an SSLEngine in order
to fully configure it in compliance with the provided configuration options. |
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> |
getSSLServerSocketFactoryConfigurers(SSLContext context)
Returns the list of configurers to apply to an SSLServerSocketFactory in order
to fully configure it in compliance with the provided configuration options. |
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> |
getSSLSocketFactoryConfigurers(SSLContext context)
Returns the list of configurers to apply to an SSLSocketFactory in order
to fully configure it in compliance with the provided configuration options. |
TrustManagersParameters |
getTrustManagers()
|
void |
setCertAlias(String certAlias)
An optional certificate alias to use. |
void |
setClientParameters(SSLContextClientParameters clientParameters)
The optional configuration options to be applied purely to the client side settings of the SSLContext. |
void |
setKeyManagers(KeyManagersParameters keyManagers)
Sets the optional key manager configuration for creating the KeyManagers used in constructing an SSLContext. |
void |
setProvider(String provider)
Sets the optional provider identifier to use when constructing an SSLContext. |
void |
setSecureRandom(SecureRandomParameters secureRandom)
Sets the optional secure random configuration options to use for constructing the SecureRandom used in the creation of an SSLContext. |
void |
setSecureSocketProtocol(String secureSocketProtocol)
Sets the optional protocol for the secure sockets created by the SSLContext represented by this instance's configuration. |
void |
setServerParameters(SSLContextServerParameters serverParameters)
The optional configuration options to be applied purely to the server side settings of the SSLContext. |
void |
setTrustManagers(TrustManagersParameters trustManagers)
Sets the optional trust manager configuration for creating the TrustManagers used in constructing an SSLContext. |
String |
toString()
|
| Methods inherited from class org.apache.camel.util.jsse.JsseParameters |
|---|
getCamelContext, parsePropertyValue, parsePropertyValues, resolveResource, setCamelContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String DEFAULT_SECURE_SOCKET_PROTOCOL
| Constructor Detail |
|---|
public SSLContextParameters()
| Method Detail |
|---|
public KeyManagersParameters getKeyManagers()
public void setKeyManagers(KeyManagersParameters keyManagers)
KeyManagers used in constructing an SSLContext.
keyManagers - the options or null to provide no
KeyManagerspublic TrustManagersParameters getTrustManagers()
public void setTrustManagers(TrustManagersParameters trustManagers)
TrustManagers used in constructing an SSLContext.
trustManagers - the options or null to provide no
TrustManagerspublic SecureRandomParameters getSecureRandom()
public void setSecureRandom(SecureRandomParameters secureRandom)
SecureRandom used in the creation of an SSLContext.
secureRandom - the options or null to use the defaultpublic SSLContextClientParameters getClientParameters()
public void setClientParameters(SSLContextClientParameters clientParameters)
SSLContext. Settings specified here override any duplicate settings
provided at the overall level by this class. These parameters apply to
SSLSocketFactorys and SSLEngines produced by the the SSLContext
produced from this class as well as to the SSLContext itself.
clientParameters - the optional additional client-side parameterspublic SSLContextServerParameters getServerParameters()
public void setServerParameters(SSLContextServerParameters serverParameters)
SSLContext. Settings specified here override any duplicate settings
provided at the overall level by this class. These parameters apply to
SSLServerSocketFactorys and SSLEngines produced by the the SSLContext
produced from this class as well as to the SSLContext itself.
serverParameters - the optional additional client-side parameterspublic String getProvider()
public void setProvider(String provider)
SSLContext.
provider - the identifier (from the list of available providers
returned by Security.getProviders()) or null
to use the highest priority provider implementing the secure
socket protocolSecurity.getProviders(java.util.Map),
setSecureSocketProtocol(String)public String getSecureSocketProtocol()
public void setSecureSocketProtocol(String secureSocketProtocol)
SSLContext represented by this instance's configuration. Defaults
to TLS. See Appendix A in the Java Secure Socket Extension Reference Guide for information about
standard protocol names.
secureSocketProtocol - the name of the protocol or null to
use the default (TLS)public String getCertAlias()
public void setCertAlias(String certAlias)
certAlias - an optional certificate alias to use
public SSLContext createSSLContext()
throws GeneralSecurityException,
IOException
SSLContext based on the related configuration options
of this instance. Namely, keyManagers, trustManagers, and
secureRandom, but also respecting the chosen provider and secure
socket protocol as well.
GeneralSecurityException - if there is a problem in this instances
configuration or that of its nested configuration options
IOException - if there is an error reading a key/trust store
protected void configureSSLContext(SSLContext context)
throws GeneralSecurityException
BaseSSLContextParametersSSLContext itself with direct setter calls. This method differs from
configuration options that are handled by a configurer instance in that the options are part of the
context itself and are not part of some factory or instance object returned by the context.
configureSSLContext in class BaseSSLContextParameterscontext - the context to configure
GeneralSecurityException - if there is an error configuring the contextprotected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> getSSLEngineConfigurers(SSLContext context)
BaseSSLContextParametersSSLEngine in order
to fully configure it in compliance with the provided configuration options.
The configurers are to be applied in the order in which they appear in the list.
getSSLEngineConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLEngine instances
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> getSSLSocketFactoryConfigurers(SSLContext context)
BaseSSLContextParametersSSLSocketFactory in order
to fully configure it in compliance with the provided configuration options.
The configurers are to be applied in the order in which they appear in the list.
It is preferred to use BaseSSLContextParameters.getSSLSocketFactorySSLSocketConfigurers(SSLContext) instead
of this method as SSLSocketFactory does not contain any configuration options that
are non-proprietary.
getSSLSocketFactoryConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLSocketFactory instances
BaseSSLContextParameters.getSSLSocketFactorySSLSocketConfigurers(SSLContext)protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> getSSLServerSocketFactoryConfigurers(SSLContext context)
BaseSSLContextParametersSSLServerSocketFactory in order
to fully configure it in compliance with the provided configuration options.
The configurers are to be applied in the order in which they appear in the list.
It is preferred to use BaseSSLContextParameters.getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext) instead
of this method as SSLServerSocketFactory does not contain any configuration options that
are non-proprietary.
getSSLServerSocketFactoryConfigurers in class BaseSSLContextParameterscontext - the context that serves as the factory for SSLServerSocketFactory instances
BaseSSLContextParameters.getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext)public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||