Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Listener Notifications | Asynchronous Listener Notification Classes
 
Asynchronous Listener Notification Classes
You implement an asynchronous listener notification class by extending com.wm.adk.notification.WmAsyncListenerNotification, as shown by the SessionLogListenerNotification class in the following figure. As previously mentioned, the implementation of an asynchronous listener notification is similar to a polling notification. The key differences occur in the following methods:
*boolean supports(Object data)
Determines whether the notification can process the data returned by the listener's waitForData method.
*NotificationResults runNotification(NotificationEvent data)
If the supports method returns true, the server calls this method (instead of the void runNotification method used in polling notifications) to process the data. The implementation of this method should call one of the WmAsynchronousNotification.doNotify methods for each notification it wants to generate, based on the NotificationEvent data content. This method should never return null. (NotificationEvent simply wraps the data object returned from the listener's waitForData method.)
The SessionLogListenerNotification also implements the ResourceDomainHandler interface, which demonstrates an alternative method of managing resource domains. The ResourceDomainHandler interface is described in An Alternative Approach to Organizing Resource Domains.
Asynchronous listener notification classes