Package org.apache.cxf.jaxrs.client
Interface ClientState
-
- All Known Implementing Classes:
LocalClientState,ThreadLocalClientState
public interface ClientStateRepresents the client state : - baseURI - current uri builder - current requestHeaders - current template parameters map - last response
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description URIgetBaseURI()Gets the base URIjavax.ws.rs.core.UriBuildergetCurrentBuilder()Gets the current builderjavax.ws.rs.core.MultivaluedMap<String,String>getRequestHeaders()Gets the request headersjavax.ws.rs.core.ResponsegetResponse()Gets Responsejavax.ws.rs.core.MultivaluedMap<String,String>getTemplates()Gets the templates mapClientStatenewState(URI baseURI, javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.ws.rs.core.MultivaluedMap<String,String> templates)The factory method for creating a new state.default ClientStatenewState(URI baseURI, javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.ws.rs.core.MultivaluedMap<String,String> templates, Map<String,Object> properties)The factory method for creating a new state.voidreset()Resets the current state to the baseURIvoidsetBaseURI(URI baseURI)Sets the base URIvoidsetCurrentBuilder(javax.ws.rs.core.UriBuilder currentBuilder)Sets the current buildervoidsetRequestHeaders(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders)Sets the request headersvoidsetResponse(javax.ws.rs.core.Response response)Sets ResponsevoidsetTemplates(javax.ws.rs.core.MultivaluedMap<String,String> templates)Sets the map containing template name and value pairs
-
-
-
Method Detail
-
setCurrentBuilder
void setCurrentBuilder(javax.ws.rs.core.UriBuilder currentBuilder)
Sets the current builder- Parameters:
currentBuilder- the builder
-
getCurrentBuilder
javax.ws.rs.core.UriBuilder getCurrentBuilder()
Gets the current builder- Returns:
-
setBaseURI
void setBaseURI(URI baseURI)
Sets the base URI- Parameters:
baseURI- baseURI
-
getBaseURI
URI getBaseURI()
Gets the base URI- Returns:
- baseURI
-
setResponse
void setResponse(javax.ws.rs.core.Response response)
Sets Response- Parameters:
response- response
-
getResponse
javax.ws.rs.core.Response getResponse()
Gets Response- Returns:
- response
-
setRequestHeaders
void setRequestHeaders(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders)
Sets the request headers- Parameters:
requestHeaders- request headers
-
getRequestHeaders
javax.ws.rs.core.MultivaluedMap<String,String> getRequestHeaders()
Gets the request headers- Returns:
- request headers, may be immutable
-
setTemplates
void setTemplates(javax.ws.rs.core.MultivaluedMap<String,String> templates)
Sets the map containing template name and value pairs- Parameters:
templates-
-
getTemplates
javax.ws.rs.core.MultivaluedMap<String,String> getTemplates()
Gets the templates map- Returns:
- templates
-
reset
void reset()
Resets the current state to the baseURI
-
newState
ClientState newState(URI baseURI, javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.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, javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.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
-
-