Interface OpaqueUri

All Superinterfaces:
AbsoluteUri, Normalisable<AbsoluteUri>, org.wiremock.stringparser.ParsedString, Uri

public non-sealed interface OpaqueUri extends AbsoluteUri
Represents a URI as defined in RFC 3986 which does not have an Authority, such as mailto:joan@example.com, file:/home/joan or aws:some:identifier

Implementations must be immutable and thread-safe.

See Also:
  • Method Details

    • isAbsoluteUrl

      default boolean isAbsoluteUrl()
      Description copied from interface: Uri
      Returns true if this is an absolute URL (has a scheme and authority).
      Specified by:
      isAbsoluteUrl in interface Uri
      Returns:
      true if this is an absolute URL
    • isOpaqueUri

      default boolean isOpaqueUri()
      Description copied from interface: Uri
      Returns true if this is an Opaque URI (has a scheme but no authority).
      Specified by:
      isOpaqueUri in interface Uri
      Returns:
      true if this is an Opaque URI
    • getAuthority

      @Deprecated default @Nullable Authority getAuthority()
      Deprecated.
      Description copied from interface: Uri
      Returns the authority component of this URI reference, or null if there is no authority.
      Specified by:
      getAuthority in interface Uri
      Returns:
      the authority component, or null if absent
    • getUserInfo

      @Deprecated default @Nullable UserInfo getUserInfo()
      Deprecated.
      Description copied from interface: Uri
      Returns the user info component from the authority, or null if there is no authority or no user info.
      Specified by:
      getUserInfo in interface Uri
      Returns:
      the user info component, or null if absent
    • getHost

      @Deprecated default @Nullable Host getHost()
      Deprecated.
      Description copied from interface: Uri
      Returns the host component from the authority, or null if there is no authority.
      Specified by:
      getHost in interface Uri
      Returns:
      the host component, or null if absent
    • getPort

      @Deprecated default @Nullable Port getPort()
      Deprecated.
      Description copied from interface: Uri
      Returns the port component from the authority, or null if there is no authority or no port.
      Specified by:
      getPort in interface Uri
      Returns:
      the port component, or null if absent
    • getResolvedPort

      @Deprecated default @Nullable Port getResolvedPort()
      Deprecated.
      Description copied from interface: Uri
      Returns the resolved port, which is either the explicitly defined port or the default port for the scheme.
      Specified by:
      getResolvedPort in interface Uri
      Returns:
      the resolved port, or null if no port is defined and no default exists for the scheme
    • parse

      static OpaqueUri parse(String opaqueUri) throws IllegalOpaqueUri
      Description copied from interface: Uri
      Parses a string into a URI reference.
      Parameters:
      opaqueUri - the string to parse
      Returns:
      the parsed URI reference
      Throws:
      IllegalOpaqueUri
    • of

      static OpaqueUri of(Scheme scheme, Path path)
    • of

      static OpaqueUri of(Scheme scheme, Path path, Query query)
    • of

      static OpaqueUri of(Scheme scheme, Path path, @Nullable Query query, @Nullable Fragment fragment)