Class AbstractHttpConnector<Q extends HttpBaseRequest<Q,R>,R extends HttpResponse>
java.lang.Object
org.camunda.connect.impl.AbstractConnector<Q,R>
org.camunda.connect.httpclient.impl.AbstractHttpConnector<Q,R>
- All Implemented Interfaces:
Connector<Q>
- Direct Known Subclasses:
HttpConnectorImpl
,SoapHttpConnectorImpl
public abstract class AbstractHttpConnector<Q extends HttpBaseRequest<Q,R>,R extends HttpResponse>
extends AbstractConnector<Q,R>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Charset
protected org.apache.http.impl.client.CloseableHttpClient
protected static HttpConnectorLogger
Fields inherited from class org.camunda.connect.impl.AbstractConnector
connectorId, requestInterceptors
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends org.apache.http.client.methods.HttpRequestBase>
voidapplyConfig
(T httpRequest, Map<String, Object> configOptions) protected <T extends org.apache.http.client.methods.HttpRequestBase>
voidapplyHeaders
(T httpRequest, Map<String, String> headers) protected <T extends org.apache.http.client.methods.HttpRequestBase>
voidapplyPayload
(T httpRequest, Q request) protected org.apache.http.impl.client.CloseableHttpClient
protected <T extends org.apache.http.client.methods.HttpRequestBase>
TcreateHttpRequest
(Q request) creates a apache Http* representation of the request.protected <T extends org.apache.http.client.methods.HttpRequestBase>
TcreateHttpRequestBase
(Q request) abstract Q
Create a request on the connector.protected abstract R
createResponse
(org.apache.http.client.methods.CloseableHttpResponse response) Execute the request on the connector.org.apache.http.impl.client.CloseableHttpClient
protected void
handleErrorResponse
(Q request, R invocationResult) protected <T extends org.apache.http.client.methods.HttpRequestBase>
booleanhttpMethodSupportsPayload
(T httpRequest) void
setHttpClient
(org.apache.http.impl.client.CloseableHttpClient httpClient) Methods inherited from class org.camunda.connect.impl.AbstractConnector
addRequestInterceptor, addRequestInterceptors, getId, getRequestInterceptors, setRequestInterceptors
-
Field Details
-
LOG
-
httpClient
protected org.apache.http.impl.client.CloseableHttpClient httpClient -
charset
-
-
Constructor Details
-
AbstractHttpConnector
-
-
Method Details
-
createClient
protected org.apache.http.impl.client.CloseableHttpClient createClient() -
getHttpClient
public org.apache.http.impl.client.CloseableHttpClient getHttpClient() -
setHttpClient
public void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) -
execute
Description copied from interface:Connector
Execute the request on the connector.- Parameters:
request
- the request- Returns:
- the result.
-
handleErrorResponse
-
createResponse
-
createRequest
Description copied from interface:Connector
Create a request on the connector.- Returns:
- the connector-specific request object.
-
createHttpRequest
creates a apache Http* representation of the request.- Parameters:
request
- the given request- Returns:
HttpRequestBase
an apache representation of the request
-
createHttpRequestBase
protected <T extends org.apache.http.client.methods.HttpRequestBase> T createHttpRequestBase(Q request) -
applyHeaders
-
applyPayload
protected <T extends org.apache.http.client.methods.HttpRequestBase> void applyPayload(T httpRequest, Q request) -
httpMethodSupportsPayload
protected <T extends org.apache.http.client.methods.HttpRequestBase> boolean httpMethodSupportsPayload(T httpRequest) -
applyConfig
-