Configuration
The API is likely to change as Doddle stabilises
Configuring
To create a new client configuration, we need use the builder
Storage
Configure Doddle to use your chosen storage provider. See the previous chapter about storage providers.
Packages
This is where Doddle will look for class methods annotated with the @Task
annotation.
For example, if you have a task defined in com.example.tasks.OrderTask
s then set this value to com.example.tasks.
Resolver
Doddle needs to know how to get an instance or create an instance of a class that has a method annotated with the @Task
annotation.
For example, let's say we have the following service with a task
Doddle does not know how to instantiate this class - it has no idea how to get an instance of the CustomerService
class. Let's solve that by creating a simple resolver:
This is just a simple example. You would normally use a dependency injection container such as a Guice or Spring IoC to get instances of your classes!
Great, Doddle now knows how to create the objects containing the task methods!
Scheduling
The scheduler is used to find jobs that are ready to be processed.
interval
How often to check for jobs that are ready to be processed.
Valid units are ms (milliseconds), s (seconds), m (minutes), h (hours)
delay
The time to wait before checking after the scheduler is started.
Valid units are ms (milliseconds), s (seconds), m (minutes), h (hours)
Creating the client
Build the configuration
Create the client
Great, we now have a client!
Last updated
Was this helpful?