public interface Application extends DocumentWorkerObject
| Modifier and Type | Method and Description |
|---|---|
BatchSizeController |
getBatchSizeController()
Returns the batch size controller.
|
<S> S |
getService(Class<S> service)
Returns the specified service, or
null if the service has not been registered. |
ServiceLocator |
getServiceLocator()
Returns the service locator object.
|
getApplication@Nonnull BatchSizeController getBatchSizeController()
This object controls the sizes of the batches passed to implementations of the BulkDocumentWorker interface.
<S> S getService(Class<S> service)
null if the service has not been registered.
This method can be used to retrieve services provided by the underlying Worker Framework, such as the DataStore or
ConfigurationSource services.
For example, to use the Worker Framework DataStore service:
Add the following dependency to the project POM:<dependency> <groupId>com.github.workerframework</groupId> <artifactId>worker-api</artifactId> <scope>provided</scope> </dependency>And then retrieve the service using this method:DataStore dataStore = document.getApplication().getService(DataStore.class);
S - the type of the service to be returnedservice - the interface or abstract class representing the serviceServiceLocator.getService()@Nonnull ServiceLocator getServiceLocator()
Copyright © 2015–2017 Hewlett Packard Enterprise Development LP. All rights reserved.