Handler registration and deregistration

In BTT Server side, any application entity which requires the capability of listening an interesting event needs to extend this class. A BTT Handler will be attached an JMSEvTransmit class and JMSEvReceipt class when this BTT Handler is created. These two classes are responsible for sending and receiving message from message queue. When a BTT Handler needs to handle an interesting event ,it would invoke "handleEvent()" method. And BTT Handler will send request in message queue to the server event manager for event registration . If a BTT Handler needs to stop handling an event, it would invoke "stopHandlingEvent()" to deregister from the server event manager.

For BTT client side, the application can register a DSE Handler for a specific local or remote event. In both cases, it calls the client event manager's handleEvent method and passes the event name, the notifier name, and the server name as arguments. If the event manager detects that the notifier that signals the event is available in the given context or in its list of notifiers instantiated in the workstation, the event manager adds the handler to the notifier's list of registered handlers. If the event manager cannot find the notifier in the context or in its list of notifiers, the event manager assumes that the notifier is defined on the server. In this case, it adds the handler to its own list of handlers. Similar to BTT server side, A DSE Handler can also deregister itself as a listener for an event. It uses its own stopHandlingEvent method using the event name, the notifier name, the context in which the handler is instantiated, and, if it wants to stop handling an event coming from a server, the TID of that server as arguments. This method calls the client event manager, which in turn invokes removeHandler in the local notifier or removes the handler from event manager's list of handlers if the local notifier does not exist.