Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Overview | Development Time Tasks and Support | Define Listener Notification Templates
 
Define Listener Notification Templates
A listener notification works in conjunction with a listener object to create a much more powerful model for detecting and processing events in the adapter resource than is possible with polling notifications. You need to implement one listener notification template class for each listener notification the adapter supports.
A listener object is connected to an adapter resource, waiting for the server to deliver event notifications. The listener object is instantiated and is given a connection when the associated node is enabled. The listener object remains active with the same connection to monitor the resource activity until it is explicitly disabled.
When the listener detects a publishable event in the resource, it passes an object back to the server. The server interrogates a configured list of listener notifications associated with the listener node until it finds a listener notification node that can process the event. The first listener notification to return true from this call is invoked.
The ADK includes both a synchronous and an asynchronous processing model.
*Asynchronous Listener Notification. Publishes a document to a webMethods messaging queue, using the doNotify method. The users of the adapter may process the document's data any way they want to. For example, they can create an Integration Server trigger that receives the document and executes an Integration Server service.
*Synchronous Listener Notification. Invokes a specified Integration Server service, and potentially receives a reply from the service and delivers the results back to the adapter resource. In this case, the notification object's runNotification method calls invokeService (instead of doNotify), to process the data produced by the notification. A synchronous listener notification can publish a document and wait for reply.
For more information, see Overview.