public class RequestExecutor extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.http.Header |
HEADER_CONTENT_TYPE_JSON |
protected static org.apache.http.Header |
HEADER_USER_AGENT |
protected org.apache.http.client.HttpClient |
httpClient |
protected static EngineClientLogger |
LOG |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
Modifier | Constructor and Description |
---|---|
protected |
RequestExecutor(RequestInterceptorHandler requestInterceptorHandler,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
deserializeResponse(org.apache.http.HttpEntity httpEntity,
Class<T> responseClass) |
protected <T> T |
executeRequest(org.apache.http.client.methods.HttpUriRequest httpRequest,
Class<T> responseClass) |
protected byte[] |
getRequest(String resourceUrl) |
protected <T> org.apache.http.client.ResponseHandler<T> |
handleResponse(Class<T> responseClass) |
protected void |
initHttpClient(RequestInterceptorHandler requestInterceptorHandler) |
protected <T> T |
postRequest(String resourceUrl,
RequestDto requestDto,
Class<T> responseClass) |
protected org.apache.http.entity.ByteArrayEntity |
serializeRequest(RequestDto dto) |
protected static final EngineClientLogger LOG
protected static final org.apache.http.Header HEADER_CONTENT_TYPE_JSON
protected static final org.apache.http.Header HEADER_USER_AGENT
protected org.apache.http.client.HttpClient httpClient
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected RequestExecutor(RequestInterceptorHandler requestInterceptorHandler, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected <T> T postRequest(String resourceUrl, RequestDto requestDto, Class<T> responseClass) throws EngineClientException
EngineClientException
protected byte[] getRequest(String resourceUrl) throws EngineClientException
EngineClientException
protected <T> T executeRequest(org.apache.http.client.methods.HttpUriRequest httpRequest, Class<T> responseClass) throws EngineClientException
EngineClientException
protected <T> org.apache.http.client.ResponseHandler<T> handleResponse(Class<T> responseClass)
protected <T> T deserializeResponse(org.apache.http.HttpEntity httpEntity, Class<T> responseClass) throws EngineClientException
EngineClientException
protected org.apache.http.entity.ByteArrayEntity serializeRequest(RequestDto dto) throws EngineClientException
EngineClientException
protected void initHttpClient(RequestInterceptorHandler requestInterceptorHandler)
Copyright © 2022. All rights reserved.