Package org.asynchttpclient.uri
Class Uri
- java.lang.Object
-
- org.asynchttpclient.uri.Uri
-
public class Uri extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Uri
create(String originalUrl)
static Uri
create(Uri context, String originalUrl)
boolean
equals(Object obj)
String
getAuthority()
String
getBaseUrl()
int
getExplicitPort()
String
getFragment()
String
getHost()
String
getNonEmptyPath()
String
getPath()
int
getPort()
String
getQuery()
String
getScheme()
int
getSchemeDefaultPort()
String
getUserInfo()
int
hashCode()
boolean
isSameBase(Uri other)
boolean
isSecured()
boolean
isWebSocket()
String
toBaseUrl()
String
toFullUrl()
URI
toJavaNetURI()
String
toRelativeUrl()
String
toString()
String
toUrl()
static void
validateSupportedScheme(Uri uri)
Uri
withNewQuery(String newQuery)
Uri
withNewScheme(String newScheme)
-
-
-
Field Detail
-
HTTP
public static final String HTTP
- See Also:
- Constant Field Values
-
HTTPS
public static final String HTTPS
- See Also:
- Constant Field Values
-
WS
public static final String WS
- See Also:
- Constant Field Values
-
WSS
public static final String WSS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getQuery
public String getQuery()
-
getPath
public String getPath()
-
getUserInfo
public String getUserInfo()
-
getPort
public int getPort()
-
getScheme
public String getScheme()
-
getHost
public String getHost()
-
getFragment
public String getFragment()
-
isSecured
public boolean isSecured()
-
isWebSocket
public boolean isWebSocket()
-
toJavaNetURI
public URI toJavaNetURI() throws URISyntaxException
- Throws:
URISyntaxException
-
getExplicitPort
public int getExplicitPort()
-
getSchemeDefaultPort
public int getSchemeDefaultPort()
-
toUrl
public String toUrl()
-
toBaseUrl
public String toBaseUrl()
- Returns:
- [scheme]://[hostname](:[port])/path. Port is omitted if it matches the scheme's default one.
-
toRelativeUrl
public String toRelativeUrl()
-
toFullUrl
public String toFullUrl()
-
getBaseUrl
public String getBaseUrl()
-
getAuthority
public String getAuthority()
-
isSameBase
public boolean isSameBase(Uri other)
-
getNonEmptyPath
public String getNonEmptyPath()
-
validateSupportedScheme
public static void validateSupportedScheme(Uri uri)
-
-