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.
The following examples show how to invoke SpaceStateMonitor for each of the API sets.
These command line options start SpaceStateMonitor using the default metaspace named
ms and allow it to connect to a security domain controller that has been started using the example security policy file
example_policy.txt.
To see output from SpaceStateMonitor, start
SpaceStateMonitor, and then start other example programs that define new spaces, such as
ASChat or
ASOperations, to see what is displayed when each program starts up. Exit all example programs and watch how the space state changes in the
SpaceStateMonitor command window.
Enter quit in the
SpaceStateMonitor command window to exit the program.