Skip to main content


class EnsLib.Gateway.Service extends Ens.BusinessService

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

Property Inventory

Method Inventory


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


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 methods: HeartbeatFailureActionDisplayToLogical(), HeartbeatFailureActionGet(), HeartbeatFailureActionIsValid(), HeartbeatFailureActionLogicalToDisplay(), HeartbeatFailureActionLogicalToOdbc(), HeartbeatFailureActionNormalize(), HeartbeatFailureActionSet()
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 methods: HeartbeatFailureRetryDisplayToLogical(), HeartbeatFailureRetryGet(), HeartbeatFailureRetryIsValid(), HeartbeatFailureRetryLogicalToDisplay(), HeartbeatFailureRetryNormalize(), HeartbeatFailureRetrySet()
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 methods: HeartbeatFailureTimeoutDisplayToLogical(), HeartbeatFailureTimeoutGet(), HeartbeatFailureTimeoutIsValid(), HeartbeatFailureTimeoutLogicalToDisplay(), HeartbeatFailureTimeoutNormalize(), HeartbeatFailureTimeoutSet()
property HeartbeatInterval as %Integer (MAXVAL = 3600, MINVAL = 0) [ InitialExpression = 10 ];
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 methods: HeartbeatIntervalDisplayToLogical(), HeartbeatIntervalGet(), HeartbeatIntervalIsValid(), HeartbeatIntervalLogicalToDisplay(), HeartbeatIntervalNormalize(), HeartbeatIntervalSet()
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 methods: LogfileDisplayToLogical(), LogfileGet(), LogfileIsValid(), LogfileLogicalToDisplay(), LogfileLogicalToOdbc(), LogfileNormalize(), LogfileSet()
property Port as %String [ InitialExpression = "55555" ];
TCP port number for communication between the Gateway Server and in InterSystems IRIS.
Property methods: PortDisplayToLogical(), PortGet(), PortIsValid(), PortLogicalToDisplay(), PortLogicalToOdbc(), PortNormalize(), PortSet()
property Server as %String [ InitialExpression = "" ];
IP address or name of the machine where the Gateway Server is located.
Property methods: ServerDisplayToLogical(), ServerGet(), ServerIsValid(), ServerLogicalToDisplay(), ServerLogicalToOdbc(), ServerNormalize(), ServerSet()
property UsePassphrase as %Boolean [ InitialExpression = 0 ];
If Gateway is to be started requiring a passphrase for connection
Property methods: UsePassphraseDisplayToLogical(), UsePassphraseGet(), UsePassphraseIsValid(), UsePassphraseLogicalToDisplay(), UsePassphraseNormalize(), UsePassphraseSet()


method GetObjectGateway() as %Net.Remote.ObjectGateway
method OnInit() as %Status
Upon instantiating this service, adjust some properties and start the Gateway Server.
method OnProcessInput(pInput As %Library.RegisteredObject, pOutput As %Library.RegisteredObject, ByRef pHint As %Library.String) 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.

Inherited Members

Inherited Properties

Inherited Methods


FeedbackOpens in a new tab