- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
ClientUri
,UriInfo.BuilderBase.UriInfoImpl
Information about URI, that can be used to invoke a specific request over the network.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forUriInfo
.static class
UriInfo.BuilderBase<BUILDER extends UriInfo.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UriInfo> Fluent API builder base forUriInfo
. -
Method Summary
Modifier and TypeMethodDescriptiondefault String
Authority (host:port) of this URI.static UriInfo.Builder
builder()
Create a new fluent API builder to customize configuration.static UriInfo.Builder
Create a new fluent API builder from an existing instance.static UriInfo
create()
Create a new instance with default values.fragment()
Uri Fragment of the request.host()
Host part of authority of the request.path()
Path of the request.int
port()
Port part of authority of the request.query()
URI Query of the request.scheme()
Scheme of the request (http
,https
).default URI
toUri()
Create a URI from information in this URI info.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
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
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 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:
- port
-
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
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
-