public interface Application extends DocumentWorkerObject
| Modifier and Type | Method and Description |
|---|---|
BatchSizeController |
getBatchSizeController()
Returns the batch size controller.
|
InputMessageProcessor |
getInputMessageProcessor()
Returns the input message processor.
|
String |
getName()
Returns the name of the worker, or
null if the name of the worker is unknown. |
<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.
|
String |
getVersion()
Returns the version of the worker, or
null if the version of the worker is unknown. |
getApplication@Nonnull BatchSizeController getBatchSizeController()
This object controls the sizes of the batches passed to implementations of the BulkDocumentWorker interface.
@Nonnull InputMessageProcessor getInputMessageProcessor()
This object controls how input messages are processed.
String getName()
null if the name of the worker is unknown.<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(),
Task.getService()@Nonnull ServiceLocator getServiceLocator()
String getVersion()
null if the version of the worker is unknown.Copyright © 2016–2022 EntIT Software LLC, a Micro Focus company. All rights reserved.