Interface UriInfo

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
ClientUri, UriInfo.BuilderBase.UriInfoImpl

public interface UriInfo extends Prototype.Api
Information about URI, that can be used to invoke a specific request over the network.
See Also:
  • Method Details

    • builder

      static UriInfo.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static UriInfo.Builder builder(UriInfo instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static UriInfo create()
      Create a new instance with default values.
      Returns:
      a new instance
    • scheme

      String scheme()
      Scheme of the request (http, https).
      Returns:
      the scheme, defaults to http
    • host

      String host()
      Host part of authority of the request.
      Returns:
      host, defaults to localhost
    • port

      int port()
      Port part of authority of the request. If port is not defined (e.g. authority without a port is used, or none is configured), the default port is used based on the defined scheme() - for http the port would be 80, and for https the port would be 443. If the scheme is different, if it ends with s, port would be 443, otherwise 80.
      Returns:
      port
    • authority

      default String authority()
      Authority (host:port) of this URI.
      Returns:
      authority
    • path

      UriPath path()
      Path of the request.
      Returns:
      path
    • query

      UriQuery query()
      URI Query of the request.
      Returns:
      query, may be empty
    • fragment

      UriFragment fragment()
      Uri Fragment of the request.
      Returns:
      fragment, may be empty
    • toUri

      default URI toUri()
      Create a URI from information in this URI info. Creating a URI is a relatively expensive operation (as it always validates and does some additional operations).
      Returns:
      a new URI