Class UriInfo.BuilderBase<BUILDER extends UriInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UriInfo>

java.lang.Object
io.helidon.common.uri.UriInfo.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
UriInfo.Builder
Enclosing interface:
UriInfo

public abstract static class UriInfo.BuilderBase<BUILDER extends UriInfo.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UriInfo> extends Object implements Prototype.Builder<BUILDER,PROTOTYPE>
Fluent API builder base for UriInfo.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(UriInfo prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(UriInfo.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • authority

      public BUILDER authority(String authority)
      Authority of the request, to be converted to host and port.
      Parameters:
      authority - authority of the request (host:port)
      Returns:
      updated builder instance
    • path

      public BUILDER path(String path)
      Path of the request, to be converted to UriPath.
      Parameters:
      path - of the request
      Returns:
      updated builder instance
    • scheme

      public BUILDER scheme(String scheme)
      Scheme of the request (http, https).
      Parameters:
      scheme - the scheme, defaults to http
      Returns:
      updated builder instance
      See Also:
    • host

      public BUILDER host(String host)
      Host part of authority of the request.
      Parameters:
      host - host, defaults to localhost
      Returns:
      updated builder instance
      See Also:
    • port

      public BUILDER 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.
      Parameters:
      port - port
      Returns:
      updated builder instance
      See Also:
    • path

      public BUILDER path(UriPath path)
      Path of the request.
      Parameters:
      path - path
      Returns:
      updated builder instance
      See Also:
    • query

      public BUILDER query(UriQuery query)
      URI Query of the request.
      Parameters:
      query - query, may be empty
      Returns:
      updated builder instance
      See Also:
    • fragment

      public BUILDER fragment(UriFragment fragment)
      Uri Fragment of the request.
      Parameters:
      fragment - fragment, may be empty
      Returns:
      updated builder instance
      See Also:
    • scheme

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

      public String host()
      Host part of authority of the request.
      Returns:
      the host
    • port

      public 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:
      the port
    • path

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

      public UriQuery query()
      URI Query of the request.
      Returns:
      the query
    • fragment

      public UriFragment fragment()
      Uri Fragment of the request.
      Returns:
      the fragment
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.