Broker 10.15 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Broker Event Types | Listing Event Type Definitions
 
Listing Event Type Definitions
 
Getting Multiple Event Type Definitions
Getting Event Type Definitions by Scope
The BrokerClient.getEventTypeNames method can be used to return all the event type names defined for a Broker. Once you know the name of an event, you can use the BrokerAdminClient.getEventAdminTypeDef method to obtain an event type's definition. Your client must have permission to obtain this information.
The following example illustrates how to get an event type definition:
. . .
String event_names[];
BrokerAdminTypeDef def;
BrokerAdminClient c;
try {
/* Create a Broker admin client */
c = new BrokerAdminClient(broker_host, broker_name, null,
client_group, "My Broker Monitor",null);
/* Get a list of all event type */
event_names = c.getEventTypeNames();
/* Get the event definition for the first event type */
def = c.getEventAdminTypeDef(event_names[0]);
System.out.println(“Event “+event_names[0]+” time-to-live=”
def.getTimeToLive()+” seconds”);
} catch (BrokerException ex) {
System.out.println("Error while getting event type definition\n"+ex);
return;
}
. . .