Package org.eclipse.jetty.http
Class HttpURI.Immutable
java.lang.Object
org.eclipse.jetty.http.HttpURI.Immutable
- All Implemented Interfaces:
Serializable,HttpURI
- Direct Known Subclasses:
HttpURI.Unsafe
- Enclosing interface:
- HttpURI
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpURI
HttpURI.Immutable, HttpURI.Mutable, HttpURI.Unsafe -
Method Summary
Modifier and TypeMethodDescriptionasString()booleangetHost()getParam()Get a URI path parameter.getPath()intgetPort()getQuery()getUser()booleaninthashCode()booleanhasViolation(UriCompliance.Violation violation) booleanChecks if the URI has any compliance violations against the URI specification or best practices.booleanbooleanChecks if the URI contains any ambiguous path violations that could be interpreted differently by different URI parsers.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.http.HttpURI
hasAmbiguousEmptySegment, hasAmbiguousEncoding, hasAmbiguousParameter, hasAmbiguousSegment, hasAmbiguousSeparator, hasUtf16Encoding, toURI
-
Method Details
-
asImmutable
- Specified by:
asImmutablein interfaceHttpURI- Returns:
- An immutable copy of this HttpURI.
-
asString
-
equals
-
getAuthority
- Specified by:
getAuthorityin interfaceHttpURI- Returns:
- The authority component of the URI in the form
host:port, or justhostif the port is not set, ornullif no host is set.
-
getDecodedPath
- Specified by:
getDecodedPathin interfaceHttpURI- Returns:
- The decoded path with percent-encoded characters decoded, or
nullif no path is set. - See Also:
-
getCanonicalPath
- Specified by:
getCanonicalPathin interfaceHttpURI- Returns:
- The canonical path with path parameters removed and percent-encoded characters decoded,
or
nullif no path is set. - See Also:
-
getFragment
- Specified by:
getFragmentin interfaceHttpURI- Returns:
- The fragment component of the URI (after the
#character), ornullif not set.
-
getHost
-
getParam
Description copied from interface:HttpURIGet a URI path parameter.
Path parameters were defined in RFC 2068 and appear after a semicolon in the path, such as
/path;param. This is distinct from query parameters which appear after the?character. -
getPath
-
getPathQuery
- Specified by:
getPathQueryin interfaceHttpURI- Returns:
- The raw, undecoded, path and query components combined as
path?query, or just the path if no query is present, ornullif no path is set.
-
getPort
public int getPort() -
getQuery
-
getScheme
-
getUser
-
hasAuthority
public boolean hasAuthority()- Specified by:
hasAuthorityin interfaceHttpURI- Returns:
trueif the URI has an authority component.
-
hashCode
public int hashCode() -
isAbsolute
public boolean isAbsolute()- Specified by:
isAbsolutein interfaceHttpURI- Returns:
trueif the URI has a scheme component.
-
isAmbiguous
public boolean isAmbiguous()Description copied from interface:HttpURIChecks if the URI contains any ambiguous path violations that could be interpreted differently by different URI parsers.
- Specified by:
isAmbiguousin interfaceHttpURI- Returns:
trueif the URI has any ambiguousUriCompliance.Violations.- See Also:
-
hasViolations
public boolean hasViolations()Description copied from interface:HttpURIChecks if the URI has any compliance violations against the URI specification or best practices.
- Specified by:
hasViolationsin interfaceHttpURI- Returns:
trueif the URI has anyUriCompliance.Violations.- See Also:
-
hasViolation
- Specified by:
hasViolationin interfaceHttpURI- Parameters:
violation- The violation to check.- Returns:
trueif the URI has the specified violation.- See Also:
-
getViolations
- Specified by:
getViolationsin interfaceHttpURI- Returns:
- The set of
UriCompliance.Violations detected in the URI, or an empty set if none. - See Also:
-
toString
-