Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Subscribing to and Receiving Events | Event Subscriptions | Limits on Subscriptions
 
Limits on Subscriptions
The client group to which the BrokerClient object belongs might limit the event types to which the client can subscribe. See Client Groups for more information. The example below contains an excerpt from a sample application that shows the use of the BrokerClient.canSubscribe method to check for event subscription permission. This method requires a single parameter; an event type name.
BrokerClient c;
boolean can_subscribe;
. . .
try {
can_subscribe = c.canSubscribe("Sample::SimpleEvent");
catch (BrokerException ex) {
System.out.println("Error on check for can subscribe\n"+ex);
return;
}
. . .
You can also use the BrokerClient.getCanSubscribeNames method to obtain the names of all the event types to which a Broker client can subscribe.