Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Load Balancing and Failover for Publish Operations | Broker Cluster Publisher Connection Notification | Registering the Connection Callback Object
Registering the Connection Callback Object
Use the BrokerClusterPublisher.registerConnectionCallback method to register a method that you want to be called in the event a Broker client is added or removed from the Broker cluster publisher pool. This method accepts two parameters. The first parameter is the BrokerCPConnectionCallback, it is derived object that implements your callback method. The second parameter is a client_data object, which is used to pass any needed data to the callback method.
Any callback objects previously registered for a client will be replaced by the one currently being registered.
When the BrokerCPConnectionCallback object is the callback method that is invoked, that method's connect_state parameter is set to one of the following BrokerClient defined values shown in the table below. Also, the conn_name is set to the fully-qualified Broker name on which the change occurred.
The Broker as specified by conn_name has left the territory or down
The Broker as specified by conn_name has joined the territory or became available