Module io.helidon.common.uri
Package io.helidon.common.uri
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 builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.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
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAuthority of the request, to be converted to host and port.fragment()
Uri Fragment of the request.fragment
(UriFragment fragment) Uri Fragment of the request.Update this builder from an existing prototype instance.from
(UriInfo.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.host()
Host part of authority of the request.Host part of authority of the request.path()
Path of the request.Path of the request.Path of the request, to be converted toUriPath
.int
port()
Port part of authority of the request.port
(int port) Port part of authority of the request.protected void
Handles providers and decorators.query()
URI Query of the request.URI Query of the request.scheme()
Scheme of the request (http
,https
).Scheme of the request (http
,https
).toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
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
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
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
Path of the request, to be converted toUriPath
.- Parameters:
path
- of the request- Returns:
- updated builder instance
-
scheme
Scheme of the request (http
,https
).- Parameters:
scheme
- the scheme, defaults tohttp
- Returns:
- updated builder instance
- See Also:
-
host
Host part of authority of the request.- Parameters:
host
- host, defaults tolocalhost
- Returns:
- updated builder instance
- See Also:
-
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 definedscheme()
- forhttp
the port would be80
, and forhttps
the port would be443
. If the scheme is different, if it ends withs
, port would be443
, otherwise80
.- Parameters:
port
- port- Returns:
- updated builder instance
- See Also:
-
path
Path of the request.- Parameters:
path
- path- Returns:
- updated builder instance
- See Also:
-
query
URI Query of the request.- Parameters:
query
- query, may beempty
- Returns:
- updated builder instance
- See Also:
-
fragment
Uri Fragment of the request.- Parameters:
fragment
- fragment, may beempty
- Returns:
- updated builder instance
- See Also:
-
scheme
Scheme of the request (http
,https
).- Returns:
- the scheme
-
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 definedscheme()
- forhttp
the port would be80
, and forhttps
the port would be443
. If the scheme is different, if it ends withs
, port would be443
, otherwise80
.- Returns:
- the port
-
path
Path of the request.- Returns:
- the path
-
query
URI Query of the request.- Returns:
- the query
-
fragment
Uri Fragment of the request.- Returns:
- the fragment
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-