Class DefaultUrlParser

  • All Implemented Interfaces:
    UrlParser

    public final class DefaultUrlParser
    extends Object
    implements UrlParser
    Parses an LDAP URL string.
    • Constructor Detail

      • DefaultUrlParser

        public DefaultUrlParser()
    • Method Detail

      • parse

        public Url parse​(String url)
        Description copied from interface: UrlParser
        Parses the supplied URL into a Url.
        Specified by:
        parse in interface UrlParser
        Parameters:
        url - to parse
        Returns:
        LdapURL object
      • parseHostAndPort

        private static Object[] parseHostAndPort​(String hostAndPort)
        Parses the supplied string containing a colon delimited hostname and port.
        Parameters:
        hostAndPort - to parse
        Returns:
        array containing a string hostname in the first index and an integer port in the second index
      • parseAttributes

        private static String[] parseAttributes​(String attrs)
        Parses the supplied comma delimited attributes.
        Parameters:
        attrs - to parse
        Returns:
        array of attributes
      • parseScope

        private static SearchScope parseScope​(String scope)
        Parses the supplied scope in string form.
        Parameters:
        scope - to parse
        Returns:
        search scope