Class Authority


  • public abstract class Authority
    extends java.lang.Object
    An authority component of a URI.

    An authority is made up of a host and optional user information and port.

    See Also:
    RFC 3986 - Authority
    • Method Detail

      • authority

        public static Authority authority​(Host host)
        Factory method for creating Authoritys with just a host.
        Parameters:
        host - any Host.
        Returns:
        an Authority representing the given Host.
      • authority

        public static Authority authority​(UserInfo userInfo,
                                          Host host)
        Factory method for creating Authoritys with user information and host.
        Parameters:
        userInfo - any UserInfo.
        host - any Host.
        Returns:
        an Authority representing the given UserInfo and Host.
      • authority

        public static Authority authority​(Host host,
                                          Port port)
        Factory method for creating Authoritys with host and port.
        Parameters:
        host - any Host.
        port - any Port
        Returns:
        an Authority representing the given Host and Port.
      • authority

        public static Authority authority​(UserInfo userInfo,
                                          Host host,
                                          Port port)
        Factory method for creating Authoritys with user information, host, and port.
        Parameters:
        userInfo - any UserInfo.
        host - any Host.
        port - any Port
        Returns:
        an Authority representing the given UserInfo, Host and Port
      • parse

        public static Authority parse​(java.lang.String authority)
                               throws ParseException
        Parses the given String as an authority.
        Parameters:
        authority - a String that represents a URI.
        Returns:
        an Authority representing the authority represented by the given String.
        Throws:
        ParseException - if the given String is not a valid authority.
      • host

        public abstract Host host()