Package org.wildfly.security.ssl
Interface SSLContextSelector
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A selector which chooses an SSL context based on connection information.
- Author:
- David M. Lloyd
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SSLContextSelectorA selector which always returnsnull(no match). -
Method Summary
Modifier and TypeMethodDescriptionstatic SSLContextSelectoraggregate(SSLContextSelector... selectors) Create an aggregate selector which executes each given selector in order until a match is found.static SSLContextSelectoraggregate(SSLContextSelector selector1, SSLContextSelector selector2) Create an aggregate selector which executes each given selector in order until a match is found.static SSLContextSelectorconstantSelector(SSLContext context) Create a selector which always returns the same context.selectContext(SSLConnectionInformation connectionInformation) Select the SSL context which corresponds to the given connection information.static SSLContextSelectorsniMatcherSelector(SNIMatcher matcher, SSLContext context) Create a selector which returns the given SSL context if the given SNI matcher matches.
-
Field Details
-
NULL_SELECTOR
A selector which always returnsnull(no match).
-
-
Method Details
-
selectContext
Select the SSL context which corresponds to the given connection information. The selector returns the SSL context that should be used for this connection, ornullif no SSL contexts match, in which case a fallback selector may be used, or a default SSL context selected. If no selectors match an SSL context, the connection is refused.- Parameters:
connectionInformation- information about the in-progress connection- Returns:
- the SSL context to use, or
nullif the connection is not acceptable to this selector
-
aggregate
Create an aggregate selector which executes each given selector in order until a match is found.- Parameters:
selector1- the first selector to testselector2- the second selector to test- Returns:
- the matched selector
-
aggregate
Create an aggregate selector which executes each given selector in order until a match is found.- Parameters:
selectors- the selectors to test- Returns:
- the matched selector
-
sniMatcherSelector
Create a selector which returns the given SSL context if the given SNI matcher matches.- Parameters:
matcher- the SNI matcher (must not benull)context- the SSL context to select (must not benull)- Returns:
- the context if the name matches, otherwise
null - See Also:
-
constantSelector
Create a selector which always returns the same context.- Parameters:
context- the context to return- Returns:
- the selector which always returns
context
-