Adapter Development Kit 6.5 | 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
 
Revised Code From Phases 1, 2, 3, and 4
To define an asynchronous listener notification template, you extend the class com.wm.adk.notification.WmAsyncListenerNotification. The Sample Adapter includes the subclass as AsyncListening in the com.wm.adapter.wmSampleAdapter.notification Java package. You will use this 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 (see Implementing the Polling Notification Template).
The following WmAsyncListenerNotification methods are implemented:
*The supports method, which compares the notification event name in the notification with the configured notification name to determine whether it should claim the event or not. If it is appropriate, it will return true. Otherwise, it will return false.
*The runNotification method, which processes the notification event and publishes the event to the webMethods Broker queue.
The WmSampleListener class does not declare its own bean properties. The properties declared in the AsyncListening class are as follows:
Property
Description
eventName
The event notification type name.
outputParameterNames
The fully qualified output parameter names, including all the record structures and array indicators.
outputFieldNames
The 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 will have the option to overwrite the suggested names. In this implementation, the user cannot change the names.
outputFieldTypes
The 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.