|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.jaxrs.client.AbstractClient
public class AbstractClient
Common proxy and http-centric client implementation
| Field Summary | |
|---|---|
protected ClientConfiguration |
cfg
|
| Constructor Summary | |
|---|---|
protected |
AbstractClient(ClientState initialState)
|
protected |
AbstractClient(URI baseURI)
|
| Method Summary | |
|---|---|
Client |
accept(javax.ws.rs.core.MediaType... types)
sets HTTP Accept header |
Client |
accept(String... types)
sets HTTP Accept header |
Client |
acceptEncoding(String... encs)
sets HTTP Accept-Encoding header |
Client |
acceptLanguage(String... languages)
sets HTTP Accept-Language header |
protected static void |
addParametersToBuilder(javax.ws.rs.core.UriBuilder ub,
String paramName,
Object pValue,
ParameterType pt)
|
Client |
cookie(javax.ws.rs.core.Cookie cookie)
sets HTTP Cookie header |
protected static HttpURLConnection |
createHttpConnection(URI uri,
String methodName)
|
protected Message |
createMessage(String httpMethod,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
URI currentURI)
|
protected Message |
createSimpleMessage()
|
Client |
encoding(String enc)
sets HTTP Content-Encoding header |
URI |
getBaseURI()
Gets the base URI this Client has been intialized with |
protected ClientConfiguration |
getConfiguration()
|
protected javax.ws.rs.core.UriBuilder |
getCurrentBuilder()
|
URI |
getCurrentURI()
Gets the current URI this Client is working with |
javax.ws.rs.core.MultivaluedMap<String,String> |
getHeaders()
Gets the copy of request headers |
javax.ws.rs.core.Response |
getResponse()
Gets the response state if any |
protected ClientState |
getState()
|
protected javax.ws.rs.core.MultivaluedMap<String,String> |
getTemplateParametersMap(URITemplate template,
List<Object> values)
|
Client |
header(String name,
Object... values)
Sets arbitrary HTTP Header |
Client |
headers(javax.ws.rs.core.MultivaluedMap<String,String> map)
Sets HTTP Headers |
Client |
language(String language)
sets HTTP Content-Language header |
Client |
match(javax.ws.rs.core.EntityTag tag,
boolean ifNot)
sets HTTP If-Match or If-None-Match header |
Client |
modified(Date date,
boolean ifNot)
sets HTTP If-Modified-Since or If-Unmodified-Since header |
protected String[] |
parseQuotedHeaderValue(String originalValue)
|
protected void |
prepareConduitSelector(Message message)
|
protected Object |
readBody(javax.ws.rs.core.Response r,
Message inMessage,
Class<?> cls,
Type type,
Annotation[] anns)
|
protected static void |
reportMessageHandlerProblem(String name,
Class<?> cls,
javax.ws.rs.core.MediaType ct,
Throwable cause,
javax.ws.rs.core.Response response)
|
Client |
reset()
Resets the headers and response state if any |
protected void |
resetBaseAddress(URI uri)
|
protected void |
resetCurrentBuilder(URI uri)
|
protected void |
resetResponse()
|
protected static void |
setAllHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers,
HttpURLConnection conn)
|
protected void |
setConfiguration(ClientConfiguration config)
|
protected void |
setEmptyRequestProperty(Message outMessage,
String httpMethod)
|
protected void |
setPlainOperationNameProperty(Message outMessage,
String name)
|
protected javax.ws.rs.core.Response.ResponseBuilder |
setResponseBuilder(HttpURLConnection conn,
Exchange exchange)
|
protected static PhaseInterceptorChain |
setupInInterceptorChain(ClientConfiguration cfg)
|
protected static PhaseInterceptorChain |
setupOutInterceptorChain(ClientConfiguration cfg)
|
Client |
type(javax.ws.rs.core.MediaType ct)
sets HTTP Content-Type header |
Client |
type(String type)
sets HTTP Content-Type header |
protected void |
writeBody(Object o,
Message outMessage,
Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
OutputStream os)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClientConfiguration cfg
| Constructor Detail |
|---|
protected AbstractClient(URI baseURI)
protected AbstractClient(ClientState initialState)
| Method Detail |
|---|
public Client header(String name,
Object... values)
header in interface Clientname - header namevalues - list of header values
public Client headers(javax.ws.rs.core.MultivaluedMap<String,String> map)
headers in interface Clientmap - headers
public Client accept(javax.ws.rs.core.MediaType... types)
accept in interface Clienttypes - list of JAXRS MediaTypes representing Accept header values
public Client type(javax.ws.rs.core.MediaType ct)
type in interface Clientct - JAXRS MediaType representing Content-Type value
public Client type(String type)
type in interface Clienttype - Content-Type value
public Client accept(String... types)
accept in interface Clienttypes - list of Accept header values
public Client cookie(javax.ws.rs.core.Cookie cookie)
cookie in interface Clientcookie - Cookie value
public Client modified(Date date,
boolean ifNot)
modified in interface Clientdate - 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
public Client language(String language)
language in interface Clientlanguage - Content-Language header value
public Client match(javax.ws.rs.core.EntityTag tag,
boolean ifNot)
match in interface Clienttag - ETag valueifNot - if true then If-None-Match is set, If-Match otherwise
public Client acceptLanguage(String... languages)
acceptLanguage in interface Clientlanguages - list of Accept-Language header values
public Client acceptEncoding(String... encs)
acceptEncoding in interface Clientencs - list of Accept-Encoding header value
public Client encoding(String enc)
encoding in interface Clientenc - Content-Encoding header value
public javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
getHeaders in interface Clientpublic URI getBaseURI()
getBaseURI in interface Clientpublic URI getCurrentURI()
getCurrentURI in interface Clientpublic javax.ws.rs.core.Response getResponse()
getResponse in interface Clientpublic Client reset()
reset in interface Clientprotected ClientState getState()
protected javax.ws.rs.core.UriBuilder getCurrentBuilder()
protected void resetResponse()
protected void resetBaseAddress(URI uri)
protected void resetCurrentBuilder(URI uri)
protected javax.ws.rs.core.MultivaluedMap<String,String> getTemplateParametersMap(URITemplate template,
List<Object> values)
protected javax.ws.rs.core.Response.ResponseBuilder setResponseBuilder(HttpURLConnection conn,
Exchange exchange)
throws Throwable
Throwable
protected void writeBody(Object o,
Message outMessage,
Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
OutputStream os)
protected Object readBody(javax.ws.rs.core.Response r,
Message inMessage,
Class<?> cls,
Type type,
Annotation[] anns)
protected static void addParametersToBuilder(javax.ws.rs.core.UriBuilder ub,
String paramName,
Object pValue,
ParameterType pt)
protected static void reportMessageHandlerProblem(String name,
Class<?> cls,
javax.ws.rs.core.MediaType ct,
Throwable cause,
javax.ws.rs.core.Response response)
protected static HttpURLConnection createHttpConnection(URI uri,
String methodName)
protected static void setAllHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers,
HttpURLConnection conn)
protected String[] parseQuotedHeaderValue(String originalValue)
protected ClientConfiguration getConfiguration()
protected void setConfiguration(ClientConfiguration config)
protected void prepareConduitSelector(Message message)
protected static PhaseInterceptorChain setupOutInterceptorChain(ClientConfiguration cfg)
protected static PhaseInterceptorChain setupInInterceptorChain(ClientConfiguration cfg)
protected Message createSimpleMessage()
protected Message createMessage(String httpMethod,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
URI currentURI)
protected void setEmptyRequestProperty(Message outMessage,
String httpMethod)
protected void setPlainOperationNameProperty(Message outMessage,
String name)
|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||