|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.jaxrs.client.ThreadLocalClientState
public class ThreadLocalClientState
Keeps the client state such as the baseURI, currentURI, requestHeaders, current response in a thread local storage
Constructor Summary | |
---|---|
ThreadLocalClientState(LocalClientState initialState,
long timeToKeepState)
|
|
ThreadLocalClientState(String baseURI)
|
|
ThreadLocalClientState(String baseURI,
long timeToKeepState)
|
Method Summary | |
---|---|
URI |
getBaseURI()
Gets the base URI |
javax.ws.rs.core.UriBuilder |
getCurrentBuilder()
Gets the current builder |
javax.ws.rs.core.MultivaluedMap<String,String> |
getRequestHeaders()
Gets the request headers |
javax.ws.rs.core.Response.ResponseBuilder |
getResponseBuilder()
Gets the responseBuilder |
protected ClientState |
getState()
|
javax.ws.rs.core.MultivaluedMap<String,String> |
getTemplates()
Gets the templates map |
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. |
void |
reset()
Resets the current state to the baseURI |
void |
setBaseURI(URI baseURI)
Sets the base URI |
void |
setCurrentBuilder(javax.ws.rs.core.UriBuilder currentBuilder)
Sets the current builder |
void |
setRequestHeaders(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders)
Sets the request headers |
void |
setResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder responseBuilder)
Sets the responseBuilder |
void |
setTemplates(javax.ws.rs.core.MultivaluedMap<String,String> map)
Sets the map containing template name and value pairs |
void |
setTimeToKeepState(long timeToKeepState)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadLocalClientState(String baseURI)
public ThreadLocalClientState(String baseURI, long timeToKeepState)
public ThreadLocalClientState(LocalClientState initialState, long timeToKeepState)
Method Detail |
---|
public void setCurrentBuilder(javax.ws.rs.core.UriBuilder currentBuilder)
ClientState
setCurrentBuilder
in interface ClientState
currentBuilder
- the builderpublic javax.ws.rs.core.UriBuilder getCurrentBuilder()
ClientState
getCurrentBuilder
in interface ClientState
public void setBaseURI(URI baseURI)
ClientState
setBaseURI
in interface ClientState
baseURI
- baseURIpublic URI getBaseURI()
ClientState
getBaseURI
in interface ClientState
public void setResponseBuilder(javax.ws.rs.core.Response.ResponseBuilder responseBuilder)
ClientState
setResponseBuilder
in interface ClientState
responseBuilder
- responseBuilderpublic javax.ws.rs.core.Response.ResponseBuilder getResponseBuilder()
ClientState
getResponseBuilder
in interface ClientState
public void setRequestHeaders(javax.ws.rs.core.MultivaluedMap<String,String> requestHeaders)
ClientState
setRequestHeaders
in interface ClientState
requestHeaders
- request headerspublic javax.ws.rs.core.MultivaluedMap<String,String> getRequestHeaders()
ClientState
getRequestHeaders
in interface ClientState
public javax.ws.rs.core.MultivaluedMap<String,String> getTemplates()
ClientState
getTemplates
in interface ClientState
public void setTemplates(javax.ws.rs.core.MultivaluedMap<String,String> map)
ClientState
setTemplates
in interface ClientState
public void reset()
ClientState
reset
in interface ClientState
public ClientState newState(URI baseURI, javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.ws.rs.core.MultivaluedMap<String,String> templates)
ClientState
newState
in interface ClientState
baseURI
- baseURIheaders
- request headers, can be nulltemplates
- initial templates map, can be null
protected ClientState getState()
public void setTimeToKeepState(long timeToKeepState)
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |