Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Using the Example Code : SpaceStateMonitor

SpaceStateMonitor
Overview
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.
Starting SpaceStateMonitor
The following examples show how to invoke SpaceStateMonitor for each of the API sets.
Java Invocation
java tools.SpaceStateMonitor -metaspace examplems -member_name ssmonitor
C Invocation
SpaceStateMonitor -metaspace examplems -member_name ssmonitor
.NET Invocation
AS_HOME/examples/dotnet/SpaceStateMonitor.exe -metaspace examplems -member_name ssmonitor
Starting SpaceStateMonitor with Security
The following example shows the command line options that you can use when starting SpaceStateMonitor to have it join the security domain exdomain:
-member_name ssmonitor -discovery tcp://127.0.0.1:50000 -security_token exdomain_token.txt
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.
Using SpaceStateMonitor
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.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved