Package org.camunda.bpm.client.impl
Class RequestExecutor
- java.lang.Object
-
- org.camunda.bpm.client.impl.RequestExecutor
-
public class RequestExecutor extends java.lang.Object- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.http.HeaderHEADER_CONTENT_TYPE_JSONprotected static org.apache.http.HeaderHEADER_USER_AGENTprotected org.apache.http.client.HttpClienthttpClientprotected static EngineClientLoggerLOGprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper
-
Constructor Summary
Constructors Modifier Constructor Description protectedRequestExecutor(RequestInterceptorHandler requestInterceptorHandler, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TdeserializeResponse(org.apache.http.HttpEntity httpEntity, java.lang.Class<T> responseClass)protected <T> TexecuteRequest(org.apache.http.client.methods.HttpUriRequest httpRequest, java.lang.Class<T> responseClass)protected byte[]getRequest(java.lang.String resourceUrl)protected <T> org.apache.http.client.ResponseHandler<T>handleResponse(java.lang.Class<T> responseClass)protected voidinitHttpClient(RequestInterceptorHandler requestInterceptorHandler)protected <T> TpostRequest(java.lang.String resourceUrl, RequestDto requestDto, java.lang.Class<T> responseClass)protected org.apache.http.entity.ByteArrayEntityserializeRequest(RequestDto dto)
-
-
-
Field Detail
-
LOG
protected static final EngineClientLogger LOG
-
HEADER_CONTENT_TYPE_JSON
protected static final org.apache.http.Header HEADER_CONTENT_TYPE_JSON
-
HEADER_USER_AGENT
protected static final org.apache.http.Header HEADER_USER_AGENT
-
httpClient
protected org.apache.http.client.HttpClient httpClient
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Detail
-
RequestExecutor
protected RequestExecutor(RequestInterceptorHandler requestInterceptorHandler, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
postRequest
protected <T> T postRequest(java.lang.String resourceUrl, RequestDto requestDto, java.lang.Class<T> responseClass) throws EngineClientException- Throws:
EngineClientException
-
getRequest
protected byte[] getRequest(java.lang.String resourceUrl) throws EngineClientException- Throws:
EngineClientException
-
executeRequest
protected <T> T executeRequest(org.apache.http.client.methods.HttpUriRequest httpRequest, java.lang.Class<T> responseClass) throws EngineClientException- Throws:
EngineClientException
-
handleResponse
protected <T> org.apache.http.client.ResponseHandler<T> handleResponse(java.lang.Class<T> responseClass)
-
deserializeResponse
protected <T> T deserializeResponse(org.apache.http.HttpEntity httpEntity, java.lang.Class<T> responseClass) throws EngineClientException- Throws:
EngineClientException
-
serializeRequest
protected org.apache.http.entity.ByteArrayEntity serializeRequest(RequestDto dto) throws EngineClientException
- Throws:
EngineClientException
-
initHttpClient
protected void initHttpClient(RequestInterceptorHandler requestInterceptorHandler)
-
-