Broker 10.5 | webMethods Broker Documentation | webMethods Broker Administration Java API Programmer’s Guide | Managing Client Groups | Listing Client Groups
Listing Client Groups
The BrokerAdminClient.getClientGroupNames method lets you obtain a list of all client group names known to the Broker to which your BrokerAdminClient is connected. This method is available for use by any BrokerAdminClient.
The following example illustrates how to list all client group names for a Broker:
. . .
int i;
String client_groups[];
BrokerAdminClient c;
try {
/* Create a Broker admin client */
c = new BrokerAdminClient(broker_host, broker_name, null,
client_group, "My Broker Monitor",null);
/* List of all client groups for this Broker and print them out */
client_groups = c.getClientGroupNames();
for(i = 0; i < client_groups.length; i++) {
} catch (BrokerException ex) {
System.out.println("Error while getting the client group names\n"+ex);
. . .