|
||||||||||
| 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
public abstract class BaseSSLContextParameters
Represents configuration options that can be applied in the client-side or server-side context depending on what they are applied to.
| Nested Class Summary | |
|---|---|
protected static class |
BaseSSLContextParameters.SSLContextDecorator
Makes a decorated SSLContext appear as a normal SSLContext. |
protected static class |
BaseSSLContextParameters.SSLContextSpiDecorator
Class needed to provide decoration of an existing SSLContext. |
protected static class |
BaseSSLContextParameters.SSLServerSocketFactoryDecorator
A decorator that enables the application of configuration options to be applied to created sockets even after this factory has been created and turned over to client code. |
protected static class |
BaseSSLContextParameters.SSLSocketFactoryDecorator
A decorator that enables the application of configuration options to be applied to created sockets even after this factory has been created and turned over to client code. |
| Field Summary | |
|---|---|
protected static List<String> |
DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE
|
protected static List<String> |
DEFAULT_CIPHER_SUITES_FILTER_INCLUDE
|
protected static List<String> |
DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE
|
| Constructor Summary | |
|---|---|
BaseSSLContextParameters()
|
|
| Method Summary | |
|---|---|
protected void |
configureSessionContext(SSLSessionContext sessionContext,
String sessionTimeout)
Configures a SSLSessionContext, client or server, with the supplied session timeout. |
protected void |
configureSSLContext(SSLContext context)
Configures the actual SSLContext itself with direct setter calls. |
protected Collection<String> |
filter(Collection<String> explicitValues,
Collection<String> availableValues,
Collection<String> currentValues,
FilterParameters.Patterns patterns,
FilterParameters.Patterns defaultPatterns,
boolean applyDefaults)
Filters the values in availableValues returning only the values that
are explicitly listed in explicitValues (returns them regardless
of if they appear in availableValues or not) if explicitValues is not
null or according to the following rules:
Match the include patterns in patterns and don't match the exclude patterns in patterns
if patterns is not null.
Match the include patterns in defaultPatterns and don't match the exclude patterns in defaultPatterns
if patterns is null and applyDefaults is true.
Are provided in currentValues if if patterns is null and applyDefaults is false.
|
protected Collection<String> |
filter(Collection<String> explicitValues,
Collection<String> availableValues,
List<Pattern> includePatterns,
List<Pattern> excludePatterns)
Filters the values in availableValues returning only the values that
are explicitly listed in explicitValues (returns them regardless
of if they appear in availableValues or not) if explicitValues is not
null or as match the patterns in includePatterns and do
not match the patterns in excludePatterns if explicitValues is null. |
protected boolean |
getAllowPassthrough()
Returns a flag indicating if default values should be applied in the event that no other property of the instance configures a particular aspect of the entity produced by the instance. |
CipherSuitesParameters |
getCipherSuites()
Returns the optional explicitly configured cipher suites for this configuration. |
FilterParameters |
getCipherSuitesFilter()
Returns the optional cipher suite filter for this configuration. |
protected FilterParameters |
getDefaultCipherSuitesFilter()
|
protected FilterParameters |
getDefaultSecureSocketProcotolFilter()
|
SecureSocketProtocolsParameters |
getSecureSocketProtocols()
Returns the explicitly configured secure socket protocol names for this configuration. |
FilterParameters |
getSecureSocketProtocolsFilter()
Returns the optional secure socket protocol filter for this configuration. |
String |
getSessionTimeout()
Returns the optional SSLSessionContext timeout time for SSLSessions
in seconds. |
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<SSLServerSocket>> |
getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext context)
Returns the list of configurers to apply to an SSLServerSocket 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. |
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLSocket>> |
getSSLSocketFactorySSLSocketConfigurers(SSLContext context)
Returns the list of configurers to apply to an SSLSocket in order
to fully configure it in compliance with the provided configuration
options. |
protected boolean |
matchesOneOf(String value,
List<Pattern> patterns)
Returns true if and only if the value is matched by one or more of the supplied patterns. |
void |
setCipherSuites(CipherSuitesParameters cipherSuites)
Sets the optional explicitly configured cipher suites for this configuration. |
void |
setCipherSuitesFilter(FilterParameters cipherSuitesFilter)
Sets the optional cipher suite filter for this JSSE configuration. |
void |
setSecureSocketProtocols(SecureSocketProtocolsParameters secureSocketProtocols)
Sets the explicitly configured secure socket protocol names for this configuration. |
void |
setSecureSocketProtocolsFilter(FilterParameters secureSocketProtocolsFilter)
Sets the optional secure socket protocol filter for this JSSE configuration. |
void |
setSessionTimeout(String sessionTimeout)
Sets the optional SSLSessionContext timeout time for SSLSessions
in seconds. |
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final List<String> DEFAULT_CIPHER_SUITES_FILTER_INCLUDE
protected static final List<String> DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE
protected static final List<String> DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE
| Constructor Detail |
|---|
public BaseSSLContextParameters()
| Method Detail |
|---|
public CipherSuitesParameters getCipherSuites()
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values override any filters supplied in setCipherSuitesFilter(FilterParameters)
public void setCipherSuites(CipherSuitesParameters cipherSuites)
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values override any filters supplied in setCipherSuitesFilter(FilterParameters)
cipherSuites - the suite configurationpublic FilterParameters getCipherSuitesFilter()
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values are ignored if setCipherSuites(CipherSuitesParameters) is
called with a non null argument.
public void setCipherSuitesFilter(FilterParameters cipherSuitesFilter)
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values are ignored if setCipherSuites(CipherSuitesParameters) is
called with a non null argument.
cipherSuitesFilter - the filter configurationpublic SecureSocketProtocolsParameters getSecureSocketProtocols()
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values override any filters supplied in setSecureSocketProtocolsFilter(FilterParameters)
public void setSecureSocketProtocols(SecureSocketProtocolsParameters secureSocketProtocols)
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values override any filters supplied in setSecureSocketProtocolsFilter(FilterParameters)
public FilterParameters getSecureSocketProtocolsFilter()
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values are ignored if setSecureSocketProtocols(SecureSocketProtocolsParameters) is
called with a non-null argument.
public void setSecureSocketProtocolsFilter(FilterParameters secureSocketProtocolsFilter)
SSLEngine,
SSLSocketFactory and SSLServerSocketFactory depending
on the context in which they are applied.
These values are ignored if setSecureSocketProtocols(SecureSocketProtocolsParameters) is
called with a non-null argument.
secureSocketProtocolsFilter - the filter configurationpublic String getSessionTimeout()
SSLSessionContext timeout time for SSLSessions
in seconds.
public void setSessionTimeout(String sessionTimeout)
SSLSessionContext timeout time for SSLSessions
in seconds.
sessionTimeout - the timeout value or null to use the defaultprotected boolean getAllowPassthrough()
SSLContextClientParameters,
SSLContextServerParameters
protected void configureSSLContext(SSLContext context)
throws GeneralSecurityException
SSLContext 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.
context - the context to configure
GeneralSecurityException - if there is an error configuring the contextprotected FilterParameters getDefaultCipherSuitesFilter()
protected FilterParameters getDefaultSecureSocketProcotolFilter()
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> getSSLEngineConfigurers(SSLContext context)
SSLEngine 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.
context - the context that serves as the factory for SSLEngine instances
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> getSSLSocketFactoryConfigurers(SSLContext context)
SSLSocketFactory 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 getSSLSocketFactorySSLSocketConfigurers(SSLContext) instead
of this method as SSLSocketFactory does not contain any configuration options that
are non-proprietary.
context - the context that serves as the factory for SSLSocketFactory instances
getSSLSocketFactorySSLSocketConfigurers(SSLContext)protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLServerSocketFactory>> getSSLServerSocketFactoryConfigurers(SSLContext context)
SSLServerSocketFactory 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 getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext) instead
of this method as SSLServerSocketFactory does not contain any configuration options that
are non-proprietary.
context - the context that serves as the factory for SSLServerSocketFactory instances
getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext)protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLSocket>> getSSLSocketFactorySSLSocketConfigurers(SSLContext context)
SSLSocket in order
to fully configure it in compliance with the provided configuration
options. These configurers are intended for sockets produced by a
SSLSocketFactory, see
getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext) for
configurers related to sockets produced by a
SSLServerSocketFactory. The configurers are to be applied in
the order in which they appear in the list.
context - the context that serves as the factory for
SSLSocketFactory instances
protected List<org.apache.camel.util.jsse.BaseSSLContextParameters.Configurer<SSLServerSocket>> getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext context)
SSLServerSocket in order
to fully configure it in compliance with the provided configuration
options. These configurers are intended for sockets produced by a
SSLServerSocketFactory, see
getSSLSocketFactorySSLSocketConfigurers(SSLContext) for
configurers related to sockets produced by a
SSLSocketFactory. The configurers are to be applied in
the order in which they appear in the list.
context - the context that serves as the factory for
SSLServerSocketFactory instances
protected void configureSessionContext(SSLSessionContext sessionContext,
String sessionTimeout)
throws GeneralSecurityException
SSLSessionContext, client or server, with the supplied session timeout.
sessionContext - the context to configuresessionTimeout - the timeout time period
GeneralSecurityException - if sessionContext is null
protected Collection<String> filter(Collection<String> explicitValues,
Collection<String> availableValues,
Collection<String> currentValues,
FilterParameters.Patterns patterns,
FilterParameters.Patterns defaultPatterns,
boolean applyDefaults)
availableValues returning only the values that
are explicitly listed in explicitValues (returns them regardless
of if they appear in availableValues or not) if explicitValues is not
null or according to the following rules:
patterns and don't match the exclude patterns in patterns
if patterns is not null.defaultPatterns and don't match the exclude patterns in defaultPatterns
if patterns is null and applyDefaults is true.null and applyDefaults is false.
explicitValues - the optional explicit values to useavailableValues - the available values to filter frompatterns - the optional patterns to use when explicitValues is not useddefaultPatterns - the required patterns to use when explicitValues and patterns are not usedapplyDefaults - flag indicating whether or not to apply defaults in the event that no explicit values and no
patterns apply
filter(Collection, Collection, List, List)
protected Collection<String> filter(Collection<String> explicitValues,
Collection<String> availableValues,
List<Pattern> includePatterns,
List<Pattern> excludePatterns)
availableValues returning only the values that
are explicitly listed in explicitValues (returns them regardless
of if they appear in availableValues or not) if explicitValues is not
null or as match the patterns in includePatterns and do
not match the patterns in excludePatterns if explicitValues is null.
explicitValues - the optional explicit values to useavailableValues - the available values to filter from if explicitValues is nullincludePatterns - the patterns to use for inclusion filtering, required if explicitValues is nullexcludePatterns - the patterns to use for exclusion filtering, required if explicitValues is null
protected boolean matchesOneOf(String value,
List<Pattern> patterns)
value - the value to matchpatterns - the patterns to try to match against
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||