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 Asynchronous Listener Notification Template
 
Implementing the Asynchronous Listener Notification Template
Define an asynchronous listener notification template by extending the com.wm.adk.notification.WmAsyncListenerNotification base class. The following packages, classes, and methods are added in the Sample Adapter; thereby allowing you to configure and take action when the event occur.
*A AsyncListening class created by extending the com.wm.adk.notification.WmAsyncListenerNotification base class.
You will use the template to configure a node for each of the following alert types:
*CheckDepositNotification
The system publishes this notification document when the Deposit service successfully deposits a check. You can then invoke the Clear Check service or the Bounce Check service to approve or disapprove the check.
*UnderBalanceNotification
This notification operates under the same criteria as the UnderBalance polling notification.
The following WmAsyncListenerNotification methods are implemented:
Method Name
Description
supports
Compares the notification event name with the configured notification name to determine whether it must claim the event or not. Returns true if appropriate, else returns false.
runNotification
Processes the notification event and publishes the event to the webMethods Broker queue.
The WmSampleListener class contains no bean properties. The properties declared in the AsyncListening class are as follows:
Property
Description
eventName
Event notification type name.
outputParameterNames
Fully qualified output parameter names, including all the record structures and array indicators.
outputFieldNames
Fully qualified suggested output parameter signature names, including all the record structures and array indicators.
Note:
If you set the Boolean flag to true in the createFieldMap method, the adapter user is provided with the option to overwrite the suggested names. In this implementation, the user cannot change the names.
outputFieldTypes
Output parameter data types, including all the array indicators.
The resource domains declared in the AsyncListening class are as follows:
Resource Domain
Description
notificationNames
Looks up the list of the Sample Server listener notification event names described in Banking Alerts.
outputParameterNames
Looks up the fully qualified output parameter names, including all the record structures and array indicators.
outFieldTypes
Looks up the output parameter data types, including all the array indicators.