InternalReference to the parent activity manager or null if this is the root manager.
The number of controllers that are set busy.
An error handler that is used by this activity manager.
The last active element before this state was set busy or unapplicable.
ReadonlyparentReference to the parent activity manager or null if this is the root manager.
The number of controllers that are set unapplicable.
Capture the current active element. This should be used before incrementing one of the counters.
Restore the last active element of no element is currently focused. This should be used after decrementing one of the counters.
Instances of this class are used internally to represent the state of an activity manager.
This is needed because there is the case where a child activity manager is created for a container using the "child-activity-manager" custom attribute. But when the container autoinjects the activity manager, it uses the parent activity manager as custom attributes are instantiated after the custom elements.
By making the ActivityManager a container wide singleton and lazily referencing the state, this problem is solved without applying any changes to the ActivityManager or ActivityManager factory api. Note, that there will be multiple activity managers for a single state instance.