Class StatePoller<S,F extends Enum<F>>

java.lang.Object
net.officefloor.plugin.managedobject.poll.StatePoller<S,F>

public class StatePoller<S,F extends Enum<F>> extends Object

Provides polling within a ManagedObjectSource to keep particular state up to date.

Polling is undertaken by invoking a ProcessState from the ManagedObjectExecuteContext of the ManagedObjectSource to load the StatePollContext with the next state value. Also, means to provide failures that are logged.

This is a convenient and efficient means to make keeping state of a ManagedObjectSource up to date (without having to manage the ManagedObjectExecuteContext or separate Timer that needs to be coordinated with the OfficeFloorListener).

Example use would be keeping JWT keys up to date.

Author:
Daniel Sagenschneider