Known Direct Subclasses |
Main object and access point for the SDK.
Every connector begins execution by creating an instance of this class and calling its
start()
method. This starts processing, triggering the SDK to begin making connector
calls as configured in the configuration file.
Sample usage:
public static void main(String[] args) throws IOException, InterruptedException {
Application application = new Application.Builder(
new MyConnector(new MyRepository()), args).build();
application.start();
}
Optional configuration parameter(s):
.INCREMENTAL_INTERVAL_SECONDS
- Specifies the interval between scheduled incremental traversals (in seconds)..TRAVERSE_ON_START
- Specifies whether to run the traversal immediately at start up rather than waiting for the first interval to expire..POLL_INTERVAL_SECONDS
- Specifies the interval between scheduled poll queue intervals (in seconds)..TRAVERSE_INTERVAL_SECONDS
- Specifies the interval between scheduled traversals (in seconds)..RUN_ONCE
- Specifies whether the connector should exit after a single traversal.
Nested Class Summary
class | Application.AbstractApplicationHelper<C extends AbstractBuilder<C, T extends ConnectorContext>, S extends AbstractBuilder<S, T>, T> | Helper class to make our class more testable: factory and util methods | |
class | Application.Builder | Builder object for creating Application instance. |
|
class | Application.ShutdownHook | Runnable implementation to register with addShutdownHook(Thread) . |
Constant Summary
String | INCREMENTAL_INTERVAL_SECONDS | Configuration key for incremental traversal interval. |
String | POLL_INTERVAL_SECONDS | Configuration key for interval between poll requests. |
String | RUN_ONCE | Configuration key to specify if connector should exit after full traversal. |
String | TRAVERSE_INTERVAL_SECONDS | Configuration key for full traversal intervals. |
String | TRAVERSE_ON_START | Configuration key to indicate if traversal should be performed at start of the connector process. |
Public Method Summary
static void |
setLogger(Logger logger)
Helper method to override default
Logger used by Application implementation. |
synchronized void |
shutdown(String event)
Shutdown Connector in response to an event.
|
void |
start()
Begins connector execution by initializing and starting the SDK.
|
Inherited Method Summary
Constants
public static final String INCREMENTAL_INTERVAL_SECONDS
Configuration key for incremental traversal interval.
public static final String POLL_INTERVAL_SECONDS
Configuration key for interval between poll requests.
public static final String RUN_ONCE
Configuration key to specify if connector should exit after full traversal.
public static final String TRAVERSE_INTERVAL_SECONDS
Configuration key for full traversal intervals.
public static final String TRAVERSE_ON_START
Configuration key to indicate if traversal should be performed at start of the connector process.
Public Methods
public static void setLogger (Logger logger)
Helper method to override default Logger
used by Application
implementation.
Parameters
logger | to use |
---|
public synchronized void shutdown (String event)
Shutdown Connector in response to an event.
Parameters
event | triggering shutdown. |
---|
public void start ()
Begins connector execution by initializing and starting the SDK.
This is the main entry point for the SDK. This method initializes all the objects used in traversing a repository and schedules the traversals based on the configuration parameters.
Throws
InterruptedException | if aborted during start up |
---|