Implementing the DOFSystem.StateListener

Changes to the DOFSystem's state can be tracked. This is done with the DOFSystem.StateListener.

In our example, when the requestor was created, an entry was made in the requestorMap. Once the system becomes authorized, the requestor can be initialized.

System State

When a DOFSystem changes from "not authorized" to "authorized," or when authorization fails, the system state will change. We can track these changes using the DOFSystem.StateListener.

How It Works

Typically, when creating a DOFSystem asynchronously, you use your implementation of the stateChanged method to continue setting up your requestors or providers.