public class MandrillRESTRequest extends Object
| Constructor and Description |
|---|
MandrillRESTRequest() |
| Modifier and Type | Method and Description |
|---|---|
protected BaseMandrillResponse |
convertAnonymousListResponseData(String json,
Object responseClass,
com.fasterxml.jackson.core.type.TypeReference reference) |
protected BaseMandrillResponse |
convertResponseData(String response,
Object responseClass) |
protected String |
getPostData(BaseMandrillRequest request)
This method will use the Jackson ObjectMapper to generate Mandrill API compatible JSON
|
BaseMandrillResponse |
postRequest(BaseMandrillRequest request,
String serviceMethod,
Object responseClass) |
BaseMandrillResponse |
postRequest(BaseMandrillRequest request,
String serviceMethod,
Object responseClass,
com.fasterxml.jackson.core.type.TypeReference reference) |
void |
setConfig(MandrillConfiguration config) |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient) |
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
public BaseMandrillResponse postRequest(BaseMandrillRequest request, String serviceMethod, Object responseClass) throws RequestFailedException
RequestFailedExceptionpublic BaseMandrillResponse postRequest(BaseMandrillRequest request, String serviceMethod, Object responseClass, com.fasterxml.jackson.core.type.TypeReference reference) throws RequestFailedException
RequestFailedExceptionprotected String getPostData(BaseMandrillRequest request) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException
request - one of @see com.cribbstechnologies.clients.mandrill.model.MandrillMessageRequest, @see
com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithEmail, @see
com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithQuery, @see
com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithTag, @see
com.cribbstechnologies.clients.mandrill.model.MandrillRequestWithUrlIOExceptioncom.fasterxml.jackson.databind.JsonMappingExceptioncom.fasterxml.jackson.core.JsonGenerationExceptionprotected BaseMandrillResponse convertResponseData(String response, Object responseClass) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionprotected BaseMandrillResponse convertAnonymousListResponseData(String json, Object responseClass, com.fasterxml.jackson.core.type.TypeReference reference) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic void setConfig(MandrillConfiguration config)
public void setHttpClient(org.apache.http.client.HttpClient httpClient)
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Copyright © 2014. All rights reserved.