Writing Monitors for the Event Monitoring Service (December 1999)

Contents
7
Processing a Monitor Request Event . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
Replying to Monitor Request Events. . . . . . . . . . . . . . . . . . . . . . . . . . .95
Monitor Request Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
Processing a Resource Update Event. . . . . . . . . . . . . . . . . . . . . . . . . . .107
Replying to Resource Update Events . . . . . . . . . . . . . . . . . . . . . . . . .107
Resource Update Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Processing an Unregister Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Replying to Unregister Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Unregister Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Processing a Terminate Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Processing an Asynchronous Notification . . . . . . . . . . . . . . . . . . . . . . .128
Defining an Internal Timeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Sample Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
4. Testing a Resource Monitor with montest
About the montest Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Using montest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
How montest Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
Sample montest output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
Running montest for a Resource Class . . . . . . . . . . . . . . . . . . . . . . . .138
Running montest for a Resource Instance . . . . . . . . . . . . . . . . . . . . .138
montest Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141