Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [Ens] >  [Helper] >  [Service] >  [SyncResponseHandler]
Private  Storage   

abstract class Ens.Helper.Service.SyncResponseHandler

Base class for handling delayed responses for Synchronous Request

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 5


Summary

Properties
OverrideClientResponseWaitTimeout SupportDelayedSyncRequest UseSimulatedSync

Methods
OnHandleNoResponseYet OnPopulateSendSyncHandling SendRequestSync
SetReturnStatusCode VerifySendSyncHandlingInstructions

Subclasses
Ens.Helper.Service.SyncResponseHandler.HTTP

Properties

• property OverrideClientResponseWaitTimeout as %Integer [ InitialExpression = 0 ];
Used to set expected response wait time for the client. If the client specifies the timeout then it will be used if the value of this is 0.
If the client is an IRIS Interoperabilty production SOAP operation the client response time will be included in the HTTP headers.
• property SupportDelayedSyncRequest as %Boolean [ InitialExpression = 0 ];
If the client provides unique ClientRequestKey and then ClientRetryRequestKey then the SendRequestSync carried out by the service will attempt to prevent multiple processing of the same request if the client abandons requests before completion and retries the same request.
Delayed in this context is relative to the time the requestor will wait for a response before retrying.
Only one SendRequestSync in a service method is supported.
• property UseSimulatedSync as %Boolean [ InitialExpression = 0 ];
Is this is set then the priority of the Synchronous request will be changed to Simulated Sync. This means the process might be quiesced for job stoppage/production shutdown prior to processing completion. Not applicable if target is invoked InProc. Reserved for future use.

Methods

• method OnHandleNoResponseYet() as %Status
Subclass for the protocol This is called when detect the original request is still being processed and need to be able to handle caller not handling empty response
• method OnPopulateSendSyncHandling(pTargetDispatchName As %String, pRequest As %Library.Persistent, pSyncCallTimeout As %Numeric = -1, pDescription As %String = "", ByRef pSendSyncHandling As %String) as %Status
Implement in protocol specific sub class to populate:
pSendSyncHandling("ClientRequestKey") pSendSyncHandling("ClientRetryRequestKey") pSendSyncHandling("ResponseWaitTimeoutToUse") Optional for future use: pSendSyncHandling("UseSimSync") - this has limited usage since the response from any requeued sim sync request is not used. Information/OnPopulateSendSyncHandling use only: pSendSyncHandling("ClientResponseTimeout") pSendSyncHandling("TransportMechanism")
• method SendRequestSync(pTargetDispatchName As %String, pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent, pSyncCallTimeout As %Numeric = -1, pDescription As %String = "", ByRef pSendSyncHandling As %String) as %Status
This Overrides the core Ens.BusinessService SendRequestSync method
If SupportDelayedSyncRequest is false (the default) then there is no change in behaviour.
If SupportDelayedSyncRequest is true:
1. Look for Client request key. 2. Determine if Retry or new 3. Pass on normally or pass back delayed or hold until user disconnects/disappears
• method SetReturnStatusCode(pStatusGenericReason As %String, pStatusText As %String = "", ByRef pResponse) as %Status
Subclass for the protocol specific handling of the return status. Note the Client may not receive and this can be by design since if the response is outstanding and still being processed we want to avoid returning to the caller of SendRequestSync an error as callers code flow cannot be known.
• method VerifySendSyncHandlingInstructions(ByRef pSendSyncHandling As %String) as %Boolean
Verify SendSyncHandling instructions If ClientRequestKey or ClientRetryRequestKey are longer than 128 or empty strings then do not accept for SupportDelayedResponseForRequest


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.