Client is the main entry point to the fluent API used to build and execute client requests in order to consume responses returned.
Clients are heavy-weight objects that manage the client-side communication infrastructure. Initialization as well as disposal of aClient instance may be a rather expensive operation. It is therefore advised to construct only
a small number of Client instances in the application. Client instances must be properly
closed before being disposed to avoid leaking resources.
jakarta.ws.rs.core.Configurable
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Redeclares java. Close client instance and all it's associated resources. |
| public HostnameVerifier | Returns: client hostname verifier ornull if not set.Get the hostname verifier configured in the client or |
| public SSLContext | Returns: SSL context configured to be used with the current client run-time.Get the SSL context configured to be used with the current client run-time. |
| public Invocation. | Returns: newly created invocation builder.link to build invocation from. Must not be link)null.Build an invocation builder from a link. |
| public WebTarget | |
| public WebTarget | |
| public WebTarget | Returns: web resource target bound to the provided URI.web resource URI represented as URI builder. Must not be uriBuilder)null.Build a new web resource target. |
| public WebTarget |
| close | back to summary |
|---|---|
| public void close() Redeclares java.
Close client instance and all it's associated resources. Subsequent calls have no effect and are ignored. Once the
client is closed, invoking any other method on the client instance would result in an resource targets produced by the client instance.
Invoking any method on such targets once the client is closed would result in an IllegalStateException being
thrown.
| |
| getHostnameVerifier | back to summary |
|---|---|
| public HostnameVerifier getHostnameVerifier() Get the hostname verifier configured in the client or
| |
| getSslContext | back to summary |
|---|---|
| public SSLContext getSslContext() Get the SSL context configured to be used with the current client run-time.
| |
| invocation | back to summary |
|---|---|
| public Invocation. Build an invocation builder from a link. It uses the URI and the type of the link to initialize the invocation builder. The type is used as the initial value for the HTTP Accept header, if present.
| |
| target | back to summary |
|---|---|
| public WebTarget target(String uri) Build a new web resource target.
| |
| target | back to summary |
|---|---|
| public WebTarget target(URI uri) Build a new web resource target.
| |
| target | back to summary |
|---|---|
| public WebTarget target(UriBuilder uriBuilder) Build a new web resource target.
| |
| target | back to summary |
|---|---|
| public WebTarget target(Link link) Build a new web resource target.
| |