SpaceStateMonitor

The SpaceStateMonitor example creates a SpaceStateListener for a metaspace. The listener callback is invoked whenever the state of a space changes (e.g., READY, FAILED). The listener callback displays information about the event which caused it to be invoked.

SpaceStateMonitor is only interested in events which affect the state of spaces in a metaspace. If SpaceStateMonitor connects to a metaspace with existing spaces, it will display information about those spaces when it first starts up, then display information about spaces as their state changes.