|
|
Subscribing, Posting, and Unsubscribing to Events with the ATMI and the EVENT_MIB
As the administrator for your BEA Tuxedo application, you can enter subscription requests on behalf of a client or server process through calls to the T_EVENT_COMMAND class of the EVENT_MIB(5). You can also use invoke the tpsubscribe(3c) function to subscribe, programmatically, to an event.
Identifying Event Categories Using eventexpr and filter Clients or servers can subscribe to events by calling tpsubscribe(3c). The tpsubscribe() function takes one required argument: eventexpr. The value of eventexpr can be a wildcard string that identifies the set of event names about which the user wants to be notified. Wildcard strings are described on the tpsubscribe(3c) reference page in the BEA Tuxedo ATMI C Function Reference. As an example, a user on a UNIX system platform who wants to be notified of all events related to the category of networking can specify the following value of eventexpr: The backslash preceding the period (.) indicates that the period is literal. (Without the preceding backslash, the period (.) would match any character except the end-of-line character.) The combination .* at the end of \.SysNetwork.* matches zero or more occurrences of any character except the end-of-line character. In addition, clients or servers can filter event data by specifying the optional filter argument when calling tpsubscribe(). The value of filter is a string containing a Boolean filter rule that must be evaluated successfully before the EventBroker posts the event. As an example, a user who wants to be notified only about system events having a severity level of ERROR can specify the following value of filter: When an event name is posted that evaluates successfully against eventexpr, the EventBroker tests the posted data against the filter rule associated with eventexpr. If the data passes the filter rule or if there is no filter rule for the event, the subscriber receives a notification along with any data posted with the event. Accessing the EventBroker Your application can access the EventBroker through either the ATMI or the EVENT_MIB(5). The following table describes both methods.\.SysNetwork.*
"TA_EVENT_SEVERITY='ERROR'"
Note: tppost(3c), tpsubscribe(3c), and tpunsubscribe(3c) are C functions. Equivalent routines (TPPOST(3cbl), TPSUBSCRIBE(3cbl), and TPUNSUBSCRIBE(3cbl)) are provided for COBOL programmers. See the BEA Tuxedo ATMI C Function Reference and the BEA Tuxedo ATMI COBOL Function Reference for details.
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|