Package org.camunda.connect.impl
Class AbstractRequestInvocation<T>
java.lang.Object
org.camunda.connect.impl.AbstractRequestInvocation<T>
- All Implemented Interfaces:
ConnectorInvocation
- Direct Known Subclasses:
HttpRequestInvocation
A simple invocation implementation routing a request through a chain of interceptors.
Implementations must implement the
invokeTarget() method in order to implement
the actual request execution / target invocation.- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected List<ConnectorRequestInterceptor>protected ConnectorRequest<?>protected T -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRequestInvocation(T target, ConnectorRequest<?> request, List<ConnectorRequestInterceptor> interceptorChain) -
Method Summary
-
Field Details
-
target
-
currentIndex
protected int currentIndex -
interceptorChain
-
request
-
-
Constructor Details
-
AbstractRequestInvocation
public AbstractRequestInvocation(T target, ConnectorRequest<?> request, List<ConnectorRequestInterceptor> interceptorChain)
-
-
Method Details
-
getTarget
Description copied from interface:ConnectorInvocationThe underlying raw request.- Specified by:
getTargetin interfaceConnectorInvocation- Returns:
- the raw request as executed by the connector
-
getRequest
Description copied from interface:ConnectorInvocationThe connector request as created through the API. Accessing the request from an interceptor may be useful for setting additional properties on the raw request (returned by
ConnectorInvocation.getTarget()) that are not supported by the connector.NOTE: setting parameters on the request (via)
ConnectorRequest.setRequestParameter(String, Object)will not have any effects once the request is executed.- Specified by:
getRequestin interfaceConnectorInvocation- Returns:
- the connector request
-
proceed
Description copied from interface:ConnectorInvocationMakes the request proceed through the interceptor chain.ConnectorRequestInterceptorimplementations are responsible for calling this method on the invocation.- Specified by:
proceedin interfaceConnectorInvocation- Returns:
- the result of the invocation.
- Throws:
Exception
-
invokeTarget
- Throws:
Exception
-