Class ProtocolCollection

    • Method Detail

      • getProtocolDescriptor

        public ProtocolDescriptor getProtocolDescriptor​(int protocolVersion)
        protocolVersion - Version of the protocol
        ProtocolDescriptor for the specified version, or null if the version is not in this ProtocolCollection
      • getProtocolCount

        public int getProtocolCount()
        The protocol count
      • getProtocolVersions

        public java.util.List<java.lang.Integer> getProtocolVersions()
        Get a list with the protocol versions in this collection.

        The returned List is created fresh on every call. Changes to the list have no effect on this object.

        Protocol version numbers
      • getDefaultCollection

        public static ProtocolCollection getDefaultCollection()
        Returns the default ProtocolCollection.

        The default ProtocolCollection is created when this class is loaded by the classloader.

        This implementation uses the ServiceLoader to load the default collection based on all ProtocolDescriptor implementations found using all the /META-INF/services/ in the classpath. If multiple implementations with the same value for ProtocolDescriptor.getVersion() are found, then the first implementation with the highest value for ProtocolDescriptor.getWeight() will be loaded into the default collection.

        The default ProtocolCollection
        See Also: