Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Listener Notifications | Listener Classes
 
Listener Classes
The following figure shows the classes provided by the ADK to support listener notifications. It also shows the com.wm.adk.notification.WmConnectedListener implementation class SimpleListener.
Create a listener class by extending com.wm.adk.notification.WmConnectedListener base class. You must override the following base class methods in your WmConnectedListener implementation class:
Method
Description
fillWmDescriptor
Controls how metadata parameters are displayed, and defines rules for data entry for the listener's metadata parameters. From the standpoint of the adapter implementation, the model is identical to the connection model.
listenerStartup
Initializes the listener. This method is called during the listener startup sequence as well as during the recovery procedure after an AdapterConnectionException is encountered.
waitForData
Monitors the adapter resource. This method returns data that is analyzed by the support method of associated listener notifications. For more details, see Listener and Listener Notification Interactions.
listenerShutdown
Cleans up listener resources. This method is called during the listener shutdown sequence.
Note:
You may optionally override the processNotificationResults method to allow the listener implementation class to post-process listener notification results. For an example of using both methods, see Implementing Listener Methods.
In addition, the implementation class may override the following optional methods:
Method
Description
restrictNotificationTypes
Allows the listener implementation class to restrict the notification classes it supports by explicitly identifying them. For more information, see Restricting Listeners to Register Specified Notification Templates.
shutdownCallBack
Invoked on a thread separate from the listener's thread, this method allows the listener's waitForData loop to be gracefully interrupted prior to a normal shutdown.