Package org.wildfly.security.ssl
Class ProtocolSelector
- java.lang.Object
-
- org.wildfly.security.ssl.ProtocolSelector
-
- Direct Known Subclasses:
ProtocolSelector.AddingProtocolSelector
,ProtocolSelector.FullyDeletingProtocolSelector
,ProtocolSelector.RemovingProtocolSelector
public abstract class ProtocolSelector extends Object
An immutable filter for SSL/TLS protocols.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ProtocolSelector.AddingProtocolSelector
(package private) static class
ProtocolSelector.FullyDeletingProtocolSelector
(package private) static class
ProtocolSelector.RemovingProtocolSelector
-
Field Summary
Fields Modifier and Type Field Description (package private) static ProtocolSelector
DEFAULT_SELECTOR
private static ProtocolSelector
EMPTY
(package private) ProtocolSelector
prev
-
Constructor Summary
Constructors Constructor Description ProtocolSelector(ProtocolSelector prev)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ProtocolSelector
add(String protocolName)
Add the given protocol.ProtocolSelector
add(EnumSet<Protocol> protocols)
Add the given protocols.ProtocolSelector
add(Protocol protocol)
Add the given protocol.ProtocolSelector
add(Protocol... protocols)
Add the given protocols.(package private) abstract void
applyFilter(Set<Protocol> enabled, EnumMap<Protocol,String> supported)
static ProtocolSelector
defaultProtocols()
Get the default SSL protocol selector.ProtocolSelector
deleteFully(String protocolName)
Permanently delete the given protocol.ProtocolSelector
deleteFully(EnumSet<Protocol> protocols)
Permanently delete all of the given protocols.ProtocolSelector
deleteFully(Protocol protocol)
Permanently delete the given protocol.ProtocolSelector
deleteFully(Protocol... protocols)
Permanently delete all of the given protocols.private void
doEvaluate(Set<Protocol> enabled, EnumMap<Protocol,String> supported)
static ProtocolSelector
empty()
Get the basic empty SSL protocol selector.String[]
evaluate(String[] supportedProtocols)
Evaluate this selector against the given list of JSSE supported protocols.ProtocolSelector
remove(String protocolName)
Remove the given protocol.ProtocolSelector
remove(EnumSet<Protocol> protocols)
Remove the given protocols.ProtocolSelector
remove(Protocol protocol)
Remove the given protocol.ProtocolSelector
remove(Protocol... protocols)
Remove the given protocols.String
toString()
(package private) abstract void
toString(StringBuilder b)
-
-
-
Field Detail
-
prev
final ProtocolSelector prev
-
EMPTY
private static final ProtocolSelector EMPTY
-
DEFAULT_SELECTOR
static final ProtocolSelector DEFAULT_SELECTOR
-
-
Constructor Detail
-
ProtocolSelector
ProtocolSelector(ProtocolSelector prev)
-
-
Method Detail
-
toString
abstract void toString(StringBuilder b)
-
empty
public static ProtocolSelector empty()
Get the basic empty SSL protocol selector.- Returns:
- the empty selector
-
defaultProtocols
public static ProtocolSelector defaultProtocols()
Get the default SSL protocol selector.- Returns:
- the default selector
-
deleteFully
public ProtocolSelector deleteFully(String protocolName)
Permanently delete the given protocol. Matching protocols cannot be re-added by a later rule (such rules will be ignored).- Parameters:
protocolName
- the name of the protocol to remove- Returns:
- a new selector which includes the new rule
-
deleteFully
public ProtocolSelector deleteFully(Protocol protocol)
Permanently delete the given protocol. Matching protocols cannot be re-added by a later rule (such rules will be ignored).- Parameters:
protocol
- the protocol to remove- Returns:
- a new selector which includes the new rule
-
deleteFully
public ProtocolSelector deleteFully(Protocol... protocols)
Permanently delete all of the given protocols. Matching protocols cannot be re-added by a later rule (such rules will be ignored).- Parameters:
protocols
- the protocols to remove- Returns:
- a new selector which includes the new rule
-
deleteFully
public ProtocolSelector deleteFully(EnumSet<Protocol> protocols)
Permanently delete all of the given protocols. Matching protocols cannot be re-added by a later rule (such rules will be ignored).- Parameters:
protocols
- the protocols to remove- Returns:
- a new selector which includes the new rule
-
remove
public ProtocolSelector remove(String protocolName)
Remove the given protocol. Matching protocols may be re-added by a later rule.- Parameters:
protocolName
- the name of the protocol to remove- Returns:
- a new selector which includes the new rule
-
remove
public ProtocolSelector remove(Protocol protocol)
Remove the given protocol. Matching protocols may be re-added by a later rule.- Parameters:
protocol
- the protocol to remove- Returns:
- a new selector which includes the new rule
-
remove
public ProtocolSelector remove(Protocol... protocols)
Remove the given protocols. Matching protocols may be re-added by a later rule.- Parameters:
protocols
- the protocols to remove- Returns:
- a new selector which includes the new rule
-
remove
public ProtocolSelector remove(EnumSet<Protocol> protocols)
Remove the given protocols. Matching protocols may be re-added by a later rule.- Parameters:
protocols
- the protocols to remove- Returns:
- a new selector which includes the new rule
-
add
public ProtocolSelector add(String protocolName)
Add the given protocol.- Parameters:
protocolName
- the name of the protocol to add- Returns:
- a new selector which includes the new rule
-
add
public ProtocolSelector add(Protocol protocol)
Add the given protocol.- Parameters:
protocol
- the protocol to add- Returns:
- a new selector which includes the new rule
-
add
public ProtocolSelector add(Protocol... protocols)
Add the given protocols.- Parameters:
protocols
- the protocols to add- Returns:
- a new selector which includes the new rule
-
add
public ProtocolSelector add(EnumSet<Protocol> protocols)
Add the given protocols.- Parameters:
protocols
- the protocols to add- Returns:
- a new selector which includes the new rule
-
-