public class BaseClient extends Object
Modifier and Type | Field and Description |
---|---|
protected org.codehaus.jackson.map.ObjectMapper |
mapper |
protected com.sun.jersey.api.client.WebResource |
webResource |
Constructor and Description |
---|
BaseClient(com.sun.jersey.api.client.WebResource baseWebResource,
String module) |
Modifier and Type | Method and Description |
---|---|
protected ResponseException |
buildResponseException(com.sun.jersey.api.client.ClientResponse clientResponse) |
protected void |
checkResponse(com.sun.jersey.api.client.ClientResponse response) |
protected com.sun.jersey.api.client.ClientResponse |
create(Object object) |
protected com.sun.jersey.api.client.ClientResponse |
create(Object object,
boolean checkResponse) |
protected com.sun.jersey.api.client.ClientResponse |
create(com.sun.jersey.api.client.WebResource webResource,
Object object) |
protected com.sun.jersey.api.client.ClientResponse |
create(com.sun.jersey.api.client.WebResource webResource,
Object object,
boolean checkResponse) |
protected <T> List<T> |
get(org.codehaus.jackson.type.TypeReference<List<T>> typeReference) |
protected <T> List<T> |
get(com.sun.jersey.api.client.WebResource webResource,
org.codehaus.jackson.type.TypeReference<List<T>> typeReference) |
protected String |
getJson(com.sun.jersey.api.client.WebResource webResource) |
protected String |
getJson(com.sun.jersey.api.client.WebResource webResource,
boolean checkResponse) |
protected com.sun.jersey.api.client.ClientResponse |
getResponse(com.sun.jersey.api.client.WebResource webResource) |
protected com.sun.jersey.api.client.ClientResponse |
getResponse(com.sun.jersey.api.client.WebResource webResource,
boolean checkResponse) |
protected com.sun.jersey.api.client.WebResource |
getWebResource() |
protected com.sun.jersey.api.client.WebResource |
getWebResource(String id) |
protected com.sun.jersey.api.client.WebResource |
getWebResourceContents(String id) |
protected <T> org.codehaus.jackson.type.TypeReference<List<T>> |
listTypeReference(Class<T> clazz) |
protected com.sun.jersey.api.client.ClientResponse |
multipartPost(com.sun.jersey.api.client.WebResource resource,
Map<String,Object> fields,
Iterable<com.sun.jersey.multipart.BodyPart> bodyParts) |
protected com.sun.jersey.api.client.WebResource |
path(String path) |
protected Iterable<com.sun.jersey.multipart.BodyPart> |
prepareUpload(File file) |
protected Iterable<com.sun.jersey.multipart.BodyPart> |
prepareUploads(Iterable<File> files) |
protected <T> T |
read(com.sun.jersey.api.client.ClientResponse response,
Class<T> clazz) |
protected <T> T |
read(com.sun.jersey.api.client.ClientResponse response,
org.codehaus.jackson.type.TypeReference<T> typeReference) |
protected <T> T |
readJson(String json,
Class<T> clazz) |
protected <T> T |
readJson(String json,
org.codehaus.jackson.type.TypeReference<T> typeReference) |
protected <T> T |
show(String id,
Class<T> clazz) |
protected String |
write(Object object) |
protected final org.codehaus.jackson.map.ObjectMapper mapper
protected final com.sun.jersey.api.client.WebResource webResource
public BaseClient(com.sun.jersey.api.client.WebResource baseWebResource, String module)
protected com.sun.jersey.api.client.ClientResponse create(Object object)
protected com.sun.jersey.api.client.ClientResponse create(Object object, boolean checkResponse)
protected com.sun.jersey.api.client.ClientResponse create(com.sun.jersey.api.client.WebResource webResource, Object object)
protected com.sun.jersey.api.client.ClientResponse create(com.sun.jersey.api.client.WebResource webResource, Object object, boolean checkResponse)
protected <T> List<T> get(com.sun.jersey.api.client.WebResource webResource, org.codehaus.jackson.type.TypeReference<List<T>> typeReference)
protected com.sun.jersey.api.client.ClientResponse getResponse(com.sun.jersey.api.client.WebResource webResource)
protected com.sun.jersey.api.client.ClientResponse getResponse(com.sun.jersey.api.client.WebResource webResource, boolean checkResponse)
protected String getJson(com.sun.jersey.api.client.WebResource webResource)
protected String getJson(com.sun.jersey.api.client.WebResource webResource, boolean checkResponse)
protected void checkResponse(com.sun.jersey.api.client.ClientResponse response)
protected ResponseException buildResponseException(com.sun.jersey.api.client.ClientResponse clientResponse)
protected com.sun.jersey.api.client.WebResource getWebResource()
protected com.sun.jersey.api.client.WebResource getWebResource(String id)
protected com.sun.jersey.api.client.WebResource getWebResourceContents(String id)
protected com.sun.jersey.api.client.WebResource path(String path)
protected <T> org.codehaus.jackson.type.TypeReference<List<T>> listTypeReference(Class<T> clazz)
protected com.sun.jersey.api.client.ClientResponse multipartPost(com.sun.jersey.api.client.WebResource resource, Map<String,Object> fields, Iterable<com.sun.jersey.multipart.BodyPart> bodyParts)
protected Iterable<com.sun.jersey.multipart.BodyPart> prepareUploads(Iterable<File> files)
protected <T> T readJson(String json, org.codehaus.jackson.type.TypeReference<T> typeReference)
protected <T> T read(com.sun.jersey.api.client.ClientResponse response, org.codehaus.jackson.type.TypeReference<T> typeReference)
protected <T> T read(com.sun.jersey.api.client.ClientResponse response, Class<T> clazz)
Copyright © 2014. All rights reserved.