public abstract class ApperianRequest extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ApperianRequest.Type |
Constructor and Description |
---|
ApperianRequest(ApperianRequest.Type type,
String apiPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
addEntityToRequest(com.fasterxml.jackson.databind.ObjectMapper mapper,
List<org.apache.http.Header> headers,
org.apache.http.client.methods.HttpEntityEnclosingRequestBase requestWithEntity) |
org.apache.http.client.methods.HttpUriRequest |
buildHttpRequest(ApperianEndpoint endpoint,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
<T extends ApperianResponse> |
buildResponseObject(com.fasterxml.jackson.databind.ObjectMapper mapper,
Class<T> responseClass,
org.apache.http.client.methods.CloseableHttpResponse response) |
abstract ApperianResponse |
call(ApperianEndpoint endpoint) |
protected <T extends ApperianResponse> |
doJsonRpc(ApperianEndpoint endpoint,
ApperianRequest request,
Class<T> responseClass) |
String |
getApiPath() |
ApperianRequest.Type |
getType() |
protected Object |
takeRequestJsonObject() |
public ApperianRequest(ApperianRequest.Type type, String apiPath)
public ApperianRequest.Type getType()
public String getApiPath()
public abstract ApperianResponse call(ApperianEndpoint endpoint) throws IOException
IOException
protected <T extends ApperianResponse> T doJsonRpc(ApperianEndpoint endpoint, ApperianRequest request, Class<T> responseClass) throws IOException
IOException
protected Object takeRequestJsonObject()
public org.apache.http.client.methods.HttpUriRequest buildHttpRequest(ApperianEndpoint endpoint, com.fasterxml.jackson.databind.ObjectMapper mapper)
protected void addEntityToRequest(com.fasterxml.jackson.databind.ObjectMapper mapper, List<org.apache.http.Header> headers, org.apache.http.client.methods.HttpEntityEnclosingRequestBase requestWithEntity) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingException
public <T extends ApperianResponse> T buildResponseObject(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<T> responseClass, org.apache.http.client.methods.CloseableHttpResponse response) throws IOException
IOException
Copyright © 2004-2016. All Rights Reserved.