Broker 10.15 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Broker Event Types | Destroying Event Type Definitions
 
Destroying Event Type Definitions
 
Destroying Multiple Event Types
You can use the BrokerAdminClient.destroyEventType method to destroy an event type definition on the Broker to which your BrokerAdminClient is connected. If an existing Broker client subscription or client group uses the event type, a BrokerDependencyException exception will be thrown and the event type will not be destroyed.
You can use the following methods to determine which Broker clients or client groups are dependent on a particular event type:
*BrokerAdminClient.getClientIdsWhichAreSubscribed
*BrokerAdminClient.getClientGroupsWhichCanPublish
*BrokerAdminClient.getClientGroupsWhichCanSubscribe
The following example illustrates how to use the destroyEventType to destroy an event type definition:
. . .
BrokerAdminClient c;
try {
/* Create a Broker admin client */
c = new BrokerAdminClient(broker_host, broker_name, null,
client_group, "My Broker Monitor",null);
/* Destroy the event type definition using the force option */
c.destroyEventType(“myEventType”, true);
} catch (BrokerException ex) {
System.out.println("Error getting destroying event type\n"+ex);
return;
}
. . .