- java.lang.Object
-
- net.sourceforge.urin.Authority
-
public abstract class Authority extends java.lang.ObjectAn 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 Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Authorityauthority(Host host)Factory method for creatingAuthoritys with just a host.static Authorityauthority(Host host, Port port)Factory method for creatingAuthoritys with host and port.static Authorityauthority(UserInfo userInfo, Host host)Factory method for creatingAuthoritys with user information and host.static Authorityauthority(UserInfo userInfo, Host host, Port port)Factory method for creatingAuthoritys with user information, host, and port.abstract Hosthost()static Authorityparse(java.lang.String authority)Parses the givenStringas an authority.
-
-
-
Method Detail
-
authority
public static Authority authority(Host host)
Factory method for creatingAuthoritys with just a host.- Parameters:
host- anyHost.- Returns:
- an
Authorityrepresenting the givenHost.
-
authority
public static Authority authority(UserInfo userInfo, Host host)
Factory method for creatingAuthoritys with user information and host.- Parameters:
userInfo- anyUserInfo.host- anyHost.- Returns:
- an
Authorityrepresenting the givenUserInfoandHost.
-
authority
public static Authority authority(Host host, Port port)
Factory method for creatingAuthoritys with host and port.- Parameters:
host- anyHost.port- anyPort- Returns:
- an
Authorityrepresenting the givenHostandPort.
-
authority
public static Authority authority(UserInfo userInfo, Host host, Port port)
Factory method for creatingAuthoritys with user information, host, and port.- Parameters:
userInfo- anyUserInfo.host- anyHost.port- anyPort- Returns:
- an
Authorityrepresenting the givenUserInfo,HostandPort
-
parse
public static Authority parse(java.lang.String authority) throws ParseException
Parses the givenStringas an authority.- Parameters:
authority- aStringthat represents a URI.- Returns:
- an
Authorityrepresenting the authority represented by the givenString. - Throws:
ParseException- if the givenStringis not a valid authority.
-
host
public abstract Host host()
-
-