Class ProtocolSelector


  • public abstract class ProtocolSelector
    extends Object
    An immutable filter for SSL/TLS protocols.
    Author:
    David M. Lloyd
    • Method Detail

      • 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
      • evaluate

        public final String[] evaluate​(String[] supportedProtocols)
        Evaluate this selector against the given list of JSSE supported protocols.
        Parameters:
        supportedProtocols - the supported protocols
        Returns:
        the enabled protocols (not null)