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


Chapter 5 Using the Example Code : SpaceMemberMonitor

SpaceMemberMonitor
Overview
The SpaceMemberMonitor example creates a SpaceMemberListener for a space. The listener callback is invoked whenever a member joins, leaves, or changes their role in the space (e.g. leech vs seeder). The listener callback displays information about the event which caused it to be invoked.
SpaceMemberMonitor is only interested in events that affect the members of an existing space. It does not create the space itself.
If SpaceMemberMonitor connects to a metaspace with existing members, it displays information about those members when it first starts up, and then displays information about members as they connect to or leave the space.
Starting SpaceMemberMonitor
The following examples show how to invoke SpaceMemberMonitor for each of the API sets.
Java Invocation
java tools.SpaceMemberMonitor -metaspace examplems -space myspace -member_name smmonitor
C Invocation
SpaceMemberMonitor -metaspace examplems -space myspace -member_name smmonitor
.NET Invocation
AS_HOME/examples/dotnet/SpaceMemberMonitor.exe -metaspace examplems -space myspace -member_name smmonitor
Starting SpaceMemberMonitor 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 smmonitor -discovery tcp://127.0.0.1:50000 -security_token exdomain_token.txt
These command line options start SpaceMemberMonitor 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 SpaceMemberMonitor
To see output from SpaceMemberMonitor, start SpaceMemberMonitor and then start as-agent or other example programs, such as ASOperations, to see what is displayed when each program connects to or leaves the space.
Enter quit in the command window to exit the program.

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