Class Reference
EnsLib.Gateway.Service
Server:appadmin-00044-deployment-6bf4cbc86d-9f4xc
Instance:IRIS
User:SuperUser
 
-
  [USER] >  [EnsLib] >  [Gateway] >  [Service]
Private  Storage

class EnsLib.Gateway.Service extends Ens.BusinessService

A service responsible for starting, monitoring and stopping a Gateway Server in a production.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 13 7


Summary

This is a Business Service class.

The associated Adapter class is EnsLib.Gateway.ServiceAdapter.

Properties
%AlertStartTime %ConfigName %ConfigQueueName
%LastActionTime %LastHandledTime %LastReportedError
%OutsideCreated %PreserveSession %ProcessInputCalled
%QuitTask %RequestHeader %SessionId
%SuperSession %SuperSessionCreatedBeforeSession %WaitForNextCallInterval
%WarnedLatest %gatewayName %isShadow
%stopNamedGatewayOnTeardown Adapter AlertGracePeriod
AlertGroups AlertOnError ArchiveIO
BusinessPartner GenerateSuperSessionID HeartbeatFailureAction
HeartbeatFailureRetry HeartbeatFailureTimeout HeartbeatInterval
IOLogEntry InactivityTimeout Logfile
Port Server ThrottleDelay
UsePassphrase

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OnClose %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %SuperSessionSet %ValidateObject AdapterName
AssignOneSetting CloseIOLogEntry EnumerateSettingsClose EnumerateSettingsExecute
EnumerateSettingsFetch ForceSessionId GenerateSuperSession GetDeferredResponseToken
GetMsgHdrRequestKey GetObjectGateway GetProductionSettingValue GetProductionSettings
GetPropertyConnections GetSettings GetShadowInstance NewIOLogEntry
OnError OnGenerateSuperSession OnGetConnections OnInit
OnKeepalive OnMonitor OnProcessInput OnProductionStart
OnProductionStop OnTearDown PingThisGateway PopulateSuperSession
QueueName SaveIOLogEntry SendAlert SendDeferredResponse
SendRequestAsync SendRequestSync StartThisGateway StopThisGateway

Subclasses
EnsLib.DotNetGateway.Service EnsLib.JavaGateway.Service

Parameters

• parameter ADAPTER = "EnsLib.Gateway.ServiceAdapter";
This adapter does not handle communication with external systems, it's for internal use of this class only.

Properties

• property %gatewayName as %String;
External Language Server Name. Once specified, the settings of the External Language Server supersede the settings given in the production item such as Server, Port and other gateway settings such as ClassPath. Using External Language Server is preferred over Server and Port as the means to control the external gateway and the Server/Port combination will be deprecated. If UsePassphrase is enabled then a pre-defined External Language Server Name is required.
• property %stopNamedGatewayOnTeardown as %Boolean [ InitialExpression = 0 ];
If an External Language Server is specified this setting determines if an attempt will be made to stop the specified named server when this item stops.
The default is off.
Named External Language Servers can be managed via the SMP and are also stopped when the instance is stopped.
If an External Language Server is not specified, when this item stops an attempt will always be made to stop the gateway that was started on the specified local port.
• property HeartbeatFailureAction as %String(DISPLAYLIST=",None,Restart,Alert,Restart and Alert",VALUELIST=",N,R,A,RA") [ InitialExpression = "R",Required ];
What action(s) to take if the Gateway Server goes into failure state. Setting it to Restart (default) will cause the Gateway to be restarted. Setting it to Alert will generate an alert entry in the Event Log.
Note 1: This is independent of the Alert on Error setting.
Note 2: If Address points to a remote system, this feature must not restart the server; only alerts may be generated.
See also properties HeartbeatInterval, HeartbeatFailureTimeout and HeartbeatFailureRetry.
• property HeartbeatFailureRetry as %Integer(MAXVAL=86400,MINVAL=0) [ InitialExpression = 300 ];
In case the Gateway Server goes into failure state, and stays in failure state, how much time to wait before retrying the HeartbeatFailureAction. The default value is 300 seconds (5 minutes). A value of 0 disables this retry, meaning that once there is a failure that can't be immediately recovered, there won't be automatic attempts to recovery.
See also properties HeartbeatInterval, HeartbeatFailureTimeout and HeartbeatFailureAction.
• property HeartbeatFailureTimeout as %Integer(MAXVAL=86400,MINVAL=0) [ InitialExpression = 30 ];
Number of seconds without responding to the heartbeat, to consider that the Gateway Server is in failure state. If this value is smaller than property HeartbeatInterval, it will be considered in failure state every time the Gateway communication check fails. The default is 30 seconds. The maximum value is 86400 seconds (1 day).
See also properties HeartbeatInterval, HeartbeatFailureAction and HeartbeatFailureRetry.
• property HeartbeatInterval as %Integer(MAXVAL=3600,MINVAL=0) [ InitialExpression = 10 ];
This setting is not used when an External Language Server Name is specified (%gatewayName)
Number of seconds between each communication with the Gateway Server to check if it is active. The default is 10 seconds. When enabled, the minimum value is 5 seconds and the maximum value is 3600 seconds (1 hour).
A value of 0 disables the monitoring feature; in this case, if the Gateway goes down, the status indicator color in the Production Configuration page will not be automatically updated.
See also properties HeartbeatFailureTimeout, HeartbeatFailureAction and HeartbeatFailureRetry, which only apply if monitoring is enabled.
• property Logfile as %String(MAXLEN=1023);
Fully qualified name of a file to log all communication between the InterSystems IRIS server and the Gateway. Usually this setting should be left blank, and used only for trouble-shooting.
• property Port as %String [ InitialExpression = "55555" ];
TCP port number for communication between the Gateway Server and in InterSystems IRIS.
• property Server as %String [ InitialExpression = "127.0.0.1" ];
IP address or name of the machine where the Gateway Server is located.
• property UsePassphrase as %Boolean [ InitialExpression = 0 ];
If the Gateway is to be started requiring a passphrase for connection. An External Language Server Name (%gatewayName) is required.

Methods

• method GetObjectGateway() as %DynamicObject
• method OnInit() as %Status
Upon instantiating this service, adjust some properties and start the Gateway Server.
• method OnProcessInput(pInput As %RegisteredObject, pOutput As %RegisteredObject) as %Status
This service does not actually handle input data. The call interval is used as the heartbeat interval if enabled.
• method OnTearDown() as %Status
Shutdown the Gateway Server.
• method PingThisGateway(pTimeout As %Numeric = 5) as %Status
"Ping" the Gateway Server to check if it's alive.
• method StartThisGateway()
Start up the Gateway Server.
• method StopThisGateway() as %Status
Shutdown the Gateway Server.


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