Package org.camunda.connect.impl
Class AbstractConnector<Q extends ConnectorRequest<R>,R extends ConnectorResponse>
java.lang.Object
org.camunda.connect.impl.AbstractConnector<Q,R>
- All Implemented Interfaces:
Connector<Q>
- Direct Known Subclasses:
AbstractHttpConnector
public abstract class AbstractConnector<Q extends ConnectorRequest<R>,R extends ConnectorResponse>
extends Object
implements Connector<Q>
Abstract implementation of the connector interface.
This implementation provides a linked list of interceptors and related methods for
handling interceptor invocation.
- Author:
- Daniel Meyer
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected List<ConnectorRequestInterceptor>
TheConnectorRequestInterceptor
chain -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRequestInterceptor
(ConnectorRequestInterceptor interceptor) Adds aConnectorRequestInterceptor
to this connector.addRequestInterceptors
(Collection<ConnectorRequestInterceptor> interceptors) Adds a collection ofConnectorRequestInterceptor
to this connector.getId()
The unique Id for the connector.Returns theConnectorRequestInterceptor
chain for this connector.void
setRequestInterceptors
(List<ConnectorRequestInterceptor> requestInterceptors) Sets theConnectorRequestInterceptor
s of this connector.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.camunda.connect.spi.Connector
createRequest, execute
-
Field Details
-
connectorId
-
requestInterceptors
TheConnectorRequestInterceptor
chain
-
-
Constructor Details
-
AbstractConnector
-
-
Method Details
-
getId
Description copied from interface:Connector
The unique Id for the connector.- Specified by:
getId
in interfaceConnector<Q extends ConnectorRequest<R>>
- Returns:
- the unique connector id
-
getRequestInterceptors
Description copied from interface:Connector
Returns theConnectorRequestInterceptor
chain for this connector. The implementation will return the actual list, modifications on the list will be reflected in the internal connector state. This means that you can use the returned list to modify the connector'sConnectorRequestInterceptor
chain.- Specified by:
getRequestInterceptors
in interfaceConnector<Q extends ConnectorRequest<R>>
- Returns:
- the list of interceptors.
-
setRequestInterceptors
Description copied from interface:Connector
Sets theConnectorRequestInterceptor
s of this connector. The interceptors are invoked for all requests created by the connector.- Specified by:
setRequestInterceptors
in interfaceConnector<Q extends ConnectorRequest<R>>
-
addRequestInterceptor
Description copied from interface:Connector
Adds aConnectorRequestInterceptor
to this connector. The interceptor is added at the end of the interceptor chain. The interceptor is invoked for all requests created by the connector.- Specified by:
addRequestInterceptor
in interfaceConnector<Q extends ConnectorRequest<R>>
-
addRequestInterceptors
Description copied from interface:Connector
Adds a collection ofConnectorRequestInterceptor
to this connector. The interceptors are added at the end of the interceptor chain. The interceptor is invoked for all requests created by the connector.- Specified by:
addRequestInterceptors
in interfaceConnector<Q extends ConnectorRequest<R>>
-