Package org.wiremock.url
Interface AbsoluteUri
- All Superinterfaces:
Normalisable<AbsoluteUri>,org.wiremock.stringparser.ParsedString,Uri
- All Known Subinterfaces:
AbsoluteUrl,BaseUrl,OpaqueUri,Origin,ServersideAbsoluteUrl
- All Known Implementing Classes:
BaseUrlValue
public sealed interface AbsoluteUri
extends Uri, Normalisable<AbsoluteUri>
permits AbsoluteUrl, OpaqueUri (not exhaustive)
Represents a full URI as defined in RFC
3986. The name
AbsoluteUri is used in preference to Uri to maintain consistency with
the names Url, AbsoluteUrl and RelativeUrl elsewhere in the hierarchy,
which are chosen for familiarity to developers.
An AbsoluteUri is either an AbsoluteUrl or an OpaqueUri. AbsoluteUris are used to identify resources.
Implementations must be immutable and thread-safe.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAbsoluteUri.Builder<SELF extends AbsoluteUri.Builder<SELF>>static interface -
Method Summary
Modifier and TypeMethodDescriptionstatic AbsoluteUri.Builder<?>builder(AbsoluteUri uri) static AbsoluteUri.Builder<?>Returns the scheme component of this URI, ornullif it is a URI Reference and so there is no scheme.default booleanReturnstrueif this is an absolute URI (either an absolute URL or an Opaque URI).default booleandefault booleanReturnstrueif this is a relative reference (has no scheme).Returns a normalised form of this value.static AbsoluteUriParses a string into a URI reference.default AbsoluteUridefault AbsoluteUridefault AbsoluteUrlresolve(UrlWithAuthority other) default AbsoluteUri.Transformer<?>thaw()default AbsoluteUritransform(Consumer<Uri.Transformer<?>> mutator) Methods inherited from interface org.wiremock.stringparser.ParsedString
toStringMethods inherited from interface org.wiremock.url.Uri
getAuthority, getFragment, getHost, getPath, getPort, getQuery, getQueryOrEmpty, getResolvedPort, getUserInfo, isAbsoluteUrl, isOpaqueUri, toJavaUri
-
Method Details
-
getScheme
Scheme getScheme()Description copied from interface:UriReturns the scheme component of this URI, ornullif it is a URI Reference and so there is no scheme. -
isRelative
default boolean isRelative()Description copied from interface:UriReturnstrueif this is a relative reference (has no scheme).- Specified by:
isRelativein interfaceUri- Returns:
trueif this is a relative reference
-
isAbsolute
default boolean isAbsolute()Description copied from interface:UriReturnstrueif this is an absolute URI (either an absolute URL or an Opaque URI).- Specified by:
isAbsolutein interfaceUri- Returns:
trueif this is an absolute URI
-
normalise
AbsoluteUri normalise()Description copied from interface:NormalisableReturns a normalised form of this value.- Specified by:
normalisein interfaceNormalisable<AbsoluteUri>- Returns:
- a normalised value
-
isNormalForm
default boolean isNormalForm()- Specified by:
isNormalFormin interfaceNormalisable<AbsoluteUri>
-
resolve
-
resolve
-
resolve
-
thaw
-
transform
-
builder
-
builder
-
parse
Description copied from interface:UriParses a string into a URI reference.- Parameters:
uriString- the string to parse- Returns:
- the parsed URI reference
- Throws:
IllegalAbsoluteUri
-