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
Modifier and TypeFieldDescriptionprotected int
protected List<ConnectorRequestInterceptor>
protected ConnectorRequest<?>
protected T
-
Constructor Summary
ConstructorDescriptionAbstractRequestInvocation
(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:ConnectorInvocation
The underlying raw request.- Specified by:
getTarget
in interfaceConnectorInvocation
- Returns:
- the raw request as executed by the connector
-
getRequest
Description copied from interface:ConnectorInvocation
The 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:
getRequest
in interfaceConnectorInvocation
- Returns:
- the connector request
-
proceed
Description copied from interface:ConnectorInvocation
Makes the request proceed through the interceptor chain.ConnectorRequestInterceptor
implementations are responsible for calling this method on the invocation.- Specified by:
proceed
in interfaceConnectorInvocation
- Returns:
- the result of the invocation.
- Throws:
Exception
-
invokeTarget
- Throws:
Exception
-