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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected List<ConnectorRequestInterceptor>TheConnectorRequestInterceptorchain -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRequestInterceptor(ConnectorRequestInterceptor interceptor) Adds aConnectorRequestInterceptorto this connector.addRequestInterceptors(Collection<ConnectorRequestInterceptor> interceptors) Adds a collection ofConnectorRequestInterceptorto this connector.getId()The unique Id for the connector.Returns theConnectorRequestInterceptorchain for this connector.voidsetRequestInterceptors(List<ConnectorRequestInterceptor> requestInterceptors) Sets theConnectorRequestInterceptors of this connector.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.connect.spi.Connector
createRequest, execute
-
Field Details
-
connectorId
-
requestInterceptors
TheConnectorRequestInterceptorchain
-
-
Constructor Details
-
AbstractConnector
-
-
Method Details
-
getId
Description copied from interface:ConnectorThe unique Id for the connector.- Specified by:
getIdin interfaceConnector<Q extends ConnectorRequest<R>>- Returns:
- the unique connector id
-
getRequestInterceptors
Description copied from interface:ConnectorReturns theConnectorRequestInterceptorchain 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'sConnectorRequestInterceptorchain.- Specified by:
getRequestInterceptorsin interfaceConnector<Q extends ConnectorRequest<R>>- Returns:
- the list of interceptors.
-
setRequestInterceptors
Description copied from interface:ConnectorSets theConnectorRequestInterceptors of this connector. The interceptors are invoked for all requests created by the connector.- Specified by:
setRequestInterceptorsin interfaceConnector<Q extends ConnectorRequest<R>>
-
addRequestInterceptor
Description copied from interface:ConnectorAdds aConnectorRequestInterceptorto 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:
addRequestInterceptorin interfaceConnector<Q extends ConnectorRequest<R>>
-
addRequestInterceptors
Description copied from interface:ConnectorAdds a collection ofConnectorRequestInterceptorto 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:
addRequestInterceptorsin interfaceConnector<Q extends ConnectorRequest<R>>
-