org.camunda.bpm.connect
Interface Connector<T extends ConnectorRequest<?>>

All Known Implementing Classes:
AbstractConnector

public interface Connector<T extends ConnectorRequest<?>>

A connector represents a way to interact with some system, library or technology. Examples of connectors are connectors for HTTP interaction, a connector to a third-party library like a rules engine or file system abstraction.

Once an instance of a connector is created, it is thread-safe, meaning that single connector instance my be used by multiple threads concurrently. Each thread will create new Requests which are not threadsafe and must not be shared among multiple threads.

Connectors support interceptors. Interceptors may be used for customizing connector behavior or for adding management aspects such as logging to a connector.

Author:
Daniel Meyer

Method Summary
 void addRequestInterceptor(RequestInterceptor interceptor)
          Adds a RequestInterceptor to this connector.
 T createRequest()
          Create a request on the connector.
 String getId()
          The unique Id for the connector.
 List<RequestInterceptor> getRequestInterceptors()
          Returns the RequestInterceptor chain for this connector.
 

Method Detail

getId

String getId()
The unique Id for the connector.

Returns:
the unique connector id

createRequest

T createRequest()
Create a request on the connector.

Returns:
the connector-specific request object.

addRequestInterceptor

void addRequestInterceptor(RequestInterceptor interceptor)
Adds a RequestInterceptor 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.


getRequestInterceptors

List<RequestInterceptor> getRequestInterceptors()
Returns the RequestInterceptor 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's RequestInterceptor chain.

Returns:
the list of interceptors.


Copyright © 2014 camunda services GmbH. All Rights Reserved.