Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:3500:0400:0410:0413 [2023/04/05 06:25] – ↷ Page moved and renamed from docs:3500:0400:0410_implementing_channel_s_source_and_sink:0413_handling_replies_to_service_requests to docs:3500:0400:0410:0413 seandocs:3500:0400:0410:0413 [2025/06/12 04:00] (current) – Change to AwareIM aware_support3
Line 3: Line 3:
 ==== Handling replies to service requests ==== ==== Handling replies to service requests ====
  
-When a service of the external party or //**Aware IM**// has been requested the service provider may send a reply. The reply is sent as a special notification (called the //service reply notification//). This notification implements the [[docs:3500:0300:0319|INotification]] interface and exposes methods that allow checking the status of the service request and retrieve error message if there was any.+When a service of the external party or //**AwareIM**// has been requested the service provider may send a reply. The reply is sent as a special notification (called the //service reply notification//). This notification implements the [[docs:3500:0300:0319|INotification]] interface and exposes methods that allow checking the status of the service request and retrieve error message if there was any.
  
-If //**Aware IM**// requests services of external parties, replies from the external parties need to be delivered back to //**Aware IM**//. Rather than write the Source that would do this it is possible to use the special version of a Sink that would not only deliver service requests to the external party but also send the immediate replies back to //**Aware IM**//.+If //**AwareIM**// requests services of external parties, replies from the external parties need to be delivered back to //**AwareIM**//. Rather than write the Source that would do this it is possible to use the special version of a Sink that would not only deliver service requests to the external party but also send the immediate replies back to //**AwareIM**//.
  
-Rather than extending ''AbstractSimpleSink'' class such a Sink must extend the ''AttachedReplySink'' class. ''AttachedReplySink'' has the Source, which //**Aware IM**// automatically attaches to the Sink when Sources and Sinks are constructed. The only extra functionality that the Sink extending ''AttachedReplySink'' has to provide is to feed the reply to the attached Source when the reply becomes available – this will guarantee that the reply will be delivered to //**Aware IM**//. Feeding reply to the source is achieved by calling the ''feedToSource'' method of ''AttachedReplySink'' passing it the ''DataObjects'' as required by the Source. +Rather than extending ''AbstractSimpleSink'' class such a Sink must extend the ''AttachedReplySink'' class. ''AttachedReplySink'' has the Source, which //**AwareIM**// automatically attaches to the Sink when Sources and Sinks are constructed. The only extra functionality that the Sink extending ''AttachedReplySink'' has to provide is to feed the reply to the attached Source when the reply becomes available – this will guarantee that the reply will be delivered to //**AwareIM**//. Feeding reply to the source is achieved by calling the ''feedToSource'' method of ''AttachedReplySink'' passing it the ''DataObjects'' as required by the Source. 
  
 The message fed to the source must contain the service reply notification. The service reply notification can be constructed calling the static method  The message fed to the source must contain the service reply notification. The service reply notification can be constructed calling the static method 
Line 21: Line 21:
     // call the service here     // call the service here
     // …     // …
-    // construct service reply notification and feed it back to Aware IM+    // construct service reply notification and feed it back to AwareIM
     INotification serviceReply = DomainFactory.createServiceReplyNotification (null, INotification.SERVICE_STATUS_SUCCESS, null);     INotification serviceReply = DomainFactory.createServiceReplyNotification (null, INotification.SERVICE_STATUS_SUCCESS, null);
     MessageBuilder mb = new MessageBuilder ();     MessageBuilder mb = new MessageBuilder ();
  • Last modified: 2023/04/05 06:25