Package org.apache.cxf.jaxrs.client
Class LocalClientState
java.lang.Object
org.apache.cxf.jaxrs.client.LocalClientState
- All Implemented Interfaces:
ClientState
Keeps the client state such as the baseURI, currentURI, requestHeaders, current response
-
Constructor Summary
ConstructorsConstructorDescriptionLocalClientState(URI baseURI) LocalClientState(URI baseURI, URI currentURI) LocalClientState(URI baseURI, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptionGets the base URIjakarta.ws.rs.core.UriBuilderGets the current builderGets the request headersjakarta.ws.rs.core.ResponseGets ResponseGets the templates mapnewState(URI currentURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templatesMap) The factory method for creating a new state.newState(URI currentURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templatesMap, Map<String, Object> props) The factory method for creating a new state.voidreset()Resets the current state to the baseURIvoidsetBaseURI(URI baseURI) Sets the base URIvoidsetCurrentBuilder(jakarta.ws.rs.core.UriBuilder currentBuilder) Sets the current buildervoidsetRequestHeaders(jakarta.ws.rs.core.MultivaluedMap<String, String> requestHeaders) Sets the request headersvoidsetResponse(jakarta.ws.rs.core.Response r) Sets ResponsevoidsetTemplates(jakarta.ws.rs.core.MultivaluedMap<String, String> map) Sets the map containing template name and value pairs
-
Constructor Details
-
LocalClientState
public LocalClientState() -
LocalClientState
-
LocalClientState
-
LocalClientState
-
LocalClientState
-
LocalClientState
-
-
Method Details
-
setCurrentBuilder
public void setCurrentBuilder(jakarta.ws.rs.core.UriBuilder currentBuilder) Description copied from interface:ClientStateSets the current builder- Specified by:
setCurrentBuilderin interfaceClientState- Parameters:
currentBuilder- the builder
-
getCurrentBuilder
public jakarta.ws.rs.core.UriBuilder getCurrentBuilder()Description copied from interface:ClientStateGets the current builder- Specified by:
getCurrentBuilderin interfaceClientState- Returns:
-
setBaseURI
Description copied from interface:ClientStateSets the base URI- Specified by:
setBaseURIin interfaceClientState- Parameters:
baseURI- baseURI
-
getBaseURI
Description copied from interface:ClientStateGets the base URI- Specified by:
getBaseURIin interfaceClientState- Returns:
- baseURI
-
setResponse
public void setResponse(jakarta.ws.rs.core.Response r) Description copied from interface:ClientStateSets Response- Specified by:
setResponsein interfaceClientState- Parameters:
r- response
-
getResponse
public jakarta.ws.rs.core.Response getResponse()Description copied from interface:ClientStateGets Response- Specified by:
getResponsein interfaceClientState- Returns:
- response
-
setRequestHeaders
Description copied from interface:ClientStateSets the request headers- Specified by:
setRequestHeadersin interfaceClientState- Parameters:
requestHeaders- request headers
-
getRequestHeaders
Description copied from interface:ClientStateGets the request headers- Specified by:
getRequestHeadersin interfaceClientState- Returns:
- request headers, may be immutable
-
getTemplates
Description copied from interface:ClientStateGets the templates map- Specified by:
getTemplatesin interfaceClientState- Returns:
- templates
-
setTemplates
Description copied from interface:ClientStateSets the map containing template name and value pairs- Specified by:
setTemplatesin interfaceClientState
-
reset
public void reset()Description copied from interface:ClientStateResets the current state to the baseURI- Specified by:
resetin interfaceClientState
-
newState
public ClientState newState(URI currentURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templatesMap, Map<String, Object> props) Description copied from interface:ClientStateThe 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- Specified by:
newStatein interfaceClientState- Parameters:
currentURI- baseURIheaders- request headers, can be nulltemplatesMap- initial templates map, can be nullprops- additional properties, could be null- Returns:
- client state
-
newState
public ClientState newState(URI currentURI, jakarta.ws.rs.core.MultivaluedMap<String, String> headers, jakarta.ws.rs.core.MultivaluedMap<String, String> templatesMap) Description copied from interface:ClientStateThe 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- Specified by:
newStatein interfaceClientState- Parameters:
currentURI- baseURIheaders- request headers, can be nulltemplatesMap- initial templates map, can be null- Returns:
- client state
-