Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Using the Callback Model | Understanding Callbacks | Implementing a Callback
 
Implementing a Callback
All callback objects that you register must be derived from the BrokerCallback interface. When deriving your own class from BrokerCallback, you must provide an implementation for the handleBrokerEvent method. This method has the following declaration:
public boolean handleBrokerEvent(
BrokerClient client,
BrokerEvent event,
Object client_data);
client
The client for which the event has been received.
event
The event that is being dispatched to this method.
client_data
Any data that you want to be passed to this method when it is invoked.
Your method should return true if its processing was successful or false if a failure occurred. If true is returned, the event will be acknowledged automatically. For information on acknowledging events, see Using Sequence Numbers.
Note:
If you want to save a copy of an event passed to a callback method, you must use the BrokerEvent copy constructor.