Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Sample Adapter | Phase 5: Adding Listener Notifications | Implementing the Listener
 
Implementing the Listener
Define a listener by extending the com.wm.adk.notification.WmConnectedListener base class. The following packages, classes, and methods are added in the Sample Adapter; thereby allowing you to configure and monitor events
*A WmSampleListener class created by extending the com.wm.adk.notification.WmConnectedListener base class.
Features of the listener created for Sample Server are as follows:
*The listener is a Sample Server client that uses a connection in the passive listening mode.
*The listener calls the retrieveConnection method to retrieve a connection object that you specify when you configure the listener instead of creating a native connection to the backend system.
*In the waitForData method, the connection object waits and return the following: .
*Returns the notification event if the listener is successful.
*Returns null if the listener times out.
Note:
The time out of the connection while in the blocked reading mode is an important feature of the connection object. This enables the adapter to shut down the listener if it is disabled.
*The WmSampleListener class contains no bean properties.