Package org.apache.cxf.jaxrs.client
Interface ClientState
- All Known Implementing Classes:
LocalClientState
,ThreadLocalClientState
public interface ClientState
Represents the client state :
- baseURI
- current uri builder
- current requestHeaders
- current template parameters map
- last response
-
Method Summary
Modifier and TypeMethodDescriptionGets the base URIjakarta.ws.rs.core.UriBuilder
Gets the current builderGets the request headersjakarta.ws.rs.core.Response
Gets ResponseGets the templates mapnewState
(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templates) The factory method for creating a new state.default ClientState
newState
(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templates, Map<String, Object> properties) The factory method for creating a new state.void
reset()
Resets the current state to the baseURIvoid
setBaseURI
(URI baseURI) Sets the base URIvoid
setCurrentBuilder
(jakarta.ws.rs.core.UriBuilder currentBuilder) Sets the current buildervoid
setRequestHeaders
(jakarta.ws.rs.core.MultivaluedMap<String, String> requestHeaders) Sets the request headersvoid
setResponse
(jakarta.ws.rs.core.Response response) Sets Responsevoid
setTemplates
(jakarta.ws.rs.core.MultivaluedMap<String, String> templates) Sets the map containing template name and value pairs
-
Method Details
-
setCurrentBuilder
void setCurrentBuilder(jakarta.ws.rs.core.UriBuilder currentBuilder) Sets the current builder- Parameters:
currentBuilder
- the builder
-
getCurrentBuilder
jakarta.ws.rs.core.UriBuilder getCurrentBuilder()Gets the current builder- Returns:
-
setBaseURI
Sets the base URI- Parameters:
baseURI
- baseURI
-
getBaseURI
URI getBaseURI()Gets the base URI- Returns:
- baseURI
-
setResponse
void setResponse(jakarta.ws.rs.core.Response response) Sets Response- Parameters:
response
- response
-
getResponse
jakarta.ws.rs.core.Response getResponse()Gets Response- Returns:
- response
-
setRequestHeaders
Sets the request headers- Parameters:
requestHeaders
- request headers
-
getRequestHeaders
Gets the request headers- Returns:
- request headers, may be immutable
-
setTemplates
Sets the map containing template name and value pairs- Parameters:
templates
-
-
getTemplates
Gets the templates map- Returns:
- templates
-
reset
void reset()Resets the current state to the baseURI -
newState
ClientState newState(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templates) The factory method for creating a new state. Example, proxy and WebClient.fromClient will use this method when creating subresource proxies and new web clients respectively to ensure thet stay thread-local if needed- Parameters:
baseURI
- baseURIheaders
- request headers, can be nulltemplates
- initial templates map, can be null- Returns:
- client state
-
newState
default ClientState newState(URI baseURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templates, Map<String, Object> properties) The factory method for creating a new state. Example, proxy and WebClient.fromClient will use this method when creating subresource proxies and new web clients respectively to ensure thet stay thread-local if needed- Parameters:
baseURI
- baseURIheaders
- request headers, can be nulltemplates
- initial templates map, can be nullproperties
- additional properties, could be null- Returns:
- client state
-