Package org.apache.cxf.jaxrs.client
Interface Client
- All Known Implementing Classes:
AbstractClient,ClientProxyImpl,WebClient
public interface Client
Represents common proxy and http-centric client capabilities
-
Method Summary
Modifier and TypeMethodDescriptionaccept(jakarta.ws.rs.core.MediaType... types) Set HTTP Accept headerSet HTTP Accept headeracceptEncoding(String... encodings) Set HTTP Accept-Encoding headeracceptLanguage(String... languages) Set HTTP Accept-Language headerauthorization(Object auth) Set HTTP Authorization headervoidclose()Release the internal state and configuration associated with this clientcookie(jakarta.ws.rs.core.Cookie cookie) Set HTTP Cookie headerSet HTTP Content-Encoding headerGet the base URI this Client has been intialized withGet the current URI this Client is working withGet the copy of request headersjakarta.ws.rs.core.ResponseGet the response state if anySet arbitrary HTTP HeaderSet HTTP HeadersSet HTTP Content-Language headermatch(jakarta.ws.rs.core.EntityTag tag, boolean ifNot) Set HTTP If-Match or If-None-Match headerSet HTTP If-Modified-Since or If-Unmodified-Since headerUpdate the current URI query parametersreset()Reset the headers and response state if anytype(jakarta.ws.rs.core.MediaType ct) Set HTTP Content-Type headerSet HTTP Content-Type header
-
Method Details
-
type
Set HTTP Content-Type header- Parameters:
ct- JAXRS MediaType representing Content-Type value- Returns:
- the updated Client
-
type
Set HTTP Content-Type header- Parameters:
type- Content-Type value- Returns:
- the updated Client
-
accept
Set HTTP Accept header- Parameters:
types- list of JAXRS MediaTypes representing Accept header values- Returns:
- the updated Client
-
accept
Set HTTP Accept header- Parameters:
types- list of Accept header values- Returns:
- the updated Client
-
language
Set HTTP Content-Language header- Parameters:
language- Content-Language header value- Returns:
- the updated Client
-
acceptLanguage
Set HTTP Accept-Language header- Parameters:
languages- list of Accept-Language header values- Returns:
- the updated Client
-
encoding
Set HTTP Content-Encoding header- Parameters:
encoding- Content-Encoding header value- Returns:
- the updated Client
-
acceptEncoding
Set HTTP Accept-Encoding header- Parameters:
encodings- list of Accept-Encoding header value- Returns:
- the updated Client
-
match
Set HTTP If-Match or If-None-Match header- Parameters:
tag- ETag valueifNot- if true then If-None-Match is set, If-Match otherwise- Returns:
- the updated Client
-
modified
Set HTTP If-Modified-Since or If-Unmodified-Since header- Parameters:
date- Date value, will be formated as "EEE, dd MMM yyyy HH:mm:ss zzz"ifNot- if true then If-Unmodified-Since is set, If-Modified-Since otherwise- Returns:
- the updated Client
-
cookie
Set HTTP Cookie header- Parameters:
cookie- Cookie value- Returns:
- the updated Client
-
authorization
Set HTTP Authorization header- Parameters:
auth- Authorization value- Returns:
- the updated Client
-
query
Update the current URI query parameters- Parameters:
name- query namevalues- query values- Returns:
- updated WebClient
-
header
Set arbitrary HTTP Header- Parameters:
name- header namevalues- list of header values- Returns:
- the updated Client
-
headers
Set HTTP Headers- Parameters:
map- headers- Returns:
- the updated Client
-
reset
Client reset()Reset the headers and response state if any- Returns:
- the updated Client
-
getHeaders
Get the copy of request headers- Returns:
- request headers
-
getBaseURI
URI getBaseURI()Get the base URI this Client has been intialized with- Returns:
- base URI
-
getCurrentURI
URI getCurrentURI()Get the current URI this Client is working with- Returns:
- current URI
-
getResponse
jakarta.ws.rs.core.Response getResponse()Get the response state if any- Returns:
- JAXRS Response response
-
close
void close()Release the internal state and configuration associated with this client
-