Class UriInfo


  • public class UriInfo
    extends Object
    Information about URI.
    • Constructor Detail

      • UriInfo

        public UriInfo​(String scheme,
                       String host,
                       int port,
                       String path,
                       Optional<String> query)
        Creates a new instance of UriInfo.
        Parameters:
        scheme - Scheme of the request (http, https)
        host - Host part of authority of the request
        port - Port part of authority of the request
        path - Path of the request
        query - Query of the request
    • Method Detail

      • toUri

        public URI toUri()
        Create URI from the information. This operation is expensive.
        Returns:
        URI to use
      • scheme

        public String scheme()
        Returns:
        scheme from the URI
      • host

        public String host()
        Returns:
        host from the URI
      • port

        public int port()
        Returns:
        port from the URI
      • path

        public String path()
        Returns:
        path from the URI
      • query

        public Optional<String> query()
        Returns:
        query string from the URI
      • authority

        public String authority()
        Authority (host:port) of this URI.
        Returns:
        authority
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object