public interface JitterbitConnector
A Jitterbit Connector consists of a set of activities (or functions) that can be configured by an end-user at configuration time (also know as discovery time). As part of the configuration (discovery) process, the connector should provide these functions:
testConnection(Map)
: Tests the connection information provided
about a connector's endpoint.Discoverable.getActivityRequestResponseMetadata(Discoverable.DiscoverContextRequest)
:
Returns the XSDs associated with the inputs or outputs of a specific activity
(function). The activity information is provided as part of the Discoverable.getActivityRequestResponseMetadata(DiscoverContextRequest)
.JitterbitActivity.execute(ExecutionContext)
: Executes the activity logic
that is invoked within the agent during the runtime.There are two ways to register a Jitterbit Connector with the Jitterbit platform:
JitterbitConnector.Factory
class name as part of the
manifest.mf
file that is bundled with the JAR, as a
Jitterbit-Connector-Factory-Class
attribute.
For example:Jitterbit-Connector-Factory-Class: com.example.MyConnector.Factory
JitterbitConnector
implementation with Connector
.
For details on specifying the manifest.mf
file, see the
Dropbox Connector tutorial
at the Jitterbit Developer Portal and the
Jitterbit Dropbox Connector example
at the Jitterbit GitHub site.
Modifier and Type | Interface and Description |
---|---|
static interface |
JitterbitConnector.ConnectorContext |
static interface |
JitterbitConnector.Factory
Factory that creates an instance of a
JitterbitConnector . |
static interface |
JitterbitConnector.TestQueryContext<T>
The context in which a query is tested during the discovery process.
|
static interface |
JitterbitConnector.TestQueryResult
Provides the results of testing a connection using a query string and connection properties.
|
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<JitterbitConnector.ConnectorContext> |
CONNECTOR_CONTEXT
Stores an instance of the
JitterbitConnector.ConnectorContext that the connector and activities have access to - this instance
is available during the invocation of Discoverable APIs and as well during the invocation of
JitterbitActivity.execute(ExecutionContext) . |
static ThreadLocal<JitterbitActivity.ExecutionContext> |
EXECUTION_CONTEXT
Stores an instance of the
JitterbitActivity.ExecutionContext for the current activity being executed. |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getCombinedParams(Map<String,String> params)
Convenience method to combine the protected parameters and non-protected parameters / properties.
|
ConnectionFactory |
getConnectionFactory()
Returns a reference to a factory that can be used to create a connection to the endpoint.
|
default DiscoverableObjectMetaData |
getObjectMetadata(Discoverable.DiscoverContextRequest<DiscoverableObjectMetaDataRequest> objectMetaDataRequest)
Return the details about an object that has been previously return by
(JitterbitActivity, Discoverable.DiscoverContextRequest ) |
Map<? extends String,? extends String> |
getProtectedParams()
This returns connector parameters that shouldn't be accessible or modifiable by user who is using
the connector.
|
List<ProviderLibrary> |
getProviders()
Returns a list of provider libraries associated with this connector.
|
void |
onInit()
Executed during the connector initialization.
|
void |
setProtectedParams(Map<? extends String,? extends String> params)
Set protected paramaters that shouldn't be modifiable or accessible by user who is using the
connector.
|
void |
testConnection(Map<String,String> props)
Tests that a connection to the endpoint is successful.
|
default JitterbitConnector.TestQueryResult |
testQuery(JitterbitConnector.TestQueryContext<String> queryCtx)
Tests a query string when the test query button is pressed in the Jitterbit Studio.
|
static final ThreadLocal<JitterbitActivity.ExecutionContext> EXECUTION_CONTEXT
JitterbitActivity.ExecutionContext
for the current activity being executed.static final ThreadLocal<JitterbitConnector.ConnectorContext> CONNECTOR_CONTEXT
JitterbitConnector.ConnectorContext
that the connector and activities have access to - this instance
is available during the invocation of Discoverable
APIs and as well during the invocation of
JitterbitActivity.execute(ExecutionContext)
.ConnectionFactory getConnectionFactory()
void testConnection(Map<String,String> props) throws Connection.ConnectionException
props
- connection informationConnection.ConnectionException
- if the connection is unsuccessful or if
there is an error during connection testdefault JitterbitConnector.TestQueryResult testQuery(JitterbitConnector.TestQueryContext<String> queryCtx) throws TestQueryException
queryCtx
- query contextTestQueryException
- if the test is unsuccessful or if there is an
error during connection testdefault DiscoverableObjectMetaData getObjectMetadata(Discoverable.DiscoverContextRequest<DiscoverableObjectMetaDataRequest> objectMetaDataRequest) throws Discoverable.DiscoveryException
(JitterbitActivity, Discoverable.DiscoverContextRequest )
objectMetaDataRequest
- Discoverable.DiscoveryException
List<ProviderLibrary> getProviders()
void onInit()
Map<? extends String,? extends String> getProtectedParams()
void setProtectedParams(Map<? extends String,? extends String> params)
Copyright © Jitterbit, Inc. Licensed under the Jitterbit Master Subscription Agreement.