EnsLib.Gateway.Service
class EnsLib.Gateway.Service extends Ens.BusinessService
A service responsible for starting, monitoring and stopping a Gateway Server in a production.Property Inventory
- %gatewayName
- %stopNamedGatewayOnTeardown
- HeartbeatFailureAction
- HeartbeatFailureRetry
- HeartbeatFailureTimeout
- HeartbeatInterval
- Logfile
- Port
- Server
- UsePassphrase
Method Inventory
- GetObjectGateway()
- OnInit()
- OnProcessInput()
- OnTearDown()
- PingThisGateway()
- StartThisGateway()
- StopThisGateway()
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 methods: %gatewayNameDisplayToLogical(), %gatewayNameGet(), %gatewayNameIsValid(), %gatewayNameLogicalToDisplay(), %gatewayNameLogicalToOdbc(), %gatewayNameNormalize(), %gatewayNameSet()
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.
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 methods: %stopNamedGatewayOnTeardownDisplayToLogical(), %stopNamedGatewayOnTeardownGet(), %stopNamedGatewayOnTeardownIsValid(), %stopNamedGatewayOnTeardownLogicalToDisplay(), %stopNamedGatewayOnTeardownNormalize(), %stopNamedGatewayOnTeardownSet()
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.
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.
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.
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 ];
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.
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 = "127.0.0.1" ];
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 the Gateway is to be started requiring a passphrase for connection.
An External Language Server Name (%gatewayName) is required.
Property methods: UsePassphraseDisplayToLogical(), UsePassphraseGet(), UsePassphraseIsValid(), UsePassphraseLogicalToDisplay(), UsePassphraseNormalize(), UsePassphraseSet()
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 %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.
"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
- %AlertStartTime
- %ConfigName
- %ConfigQueueName
- %LastActionTime
- %LastHandledTime
- %LastReportedError
- %OutsideCreated
- %PreserveSession
- %ProcessInputCalled
- %QuitTask
- %RequestHeader
- %SessionId
- %SuperSession
- %SuperSessionCreatedBeforeSession
- %WaitForNextCallInterval
- %WarnedLatest
- %isShadow
- Adapter
- AlertGracePeriod
- AlertGroups
- AlertOnError
- ArchiveIO
- BusinessPartner
- GenerateSuperSessionID
- IOLogEntry
- InactivityTimeout
- ThrottleDelay
Inherited 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()
- GetProductionSettingValue()
- GetProductionSettings()
- GetPropertyConnections()
- GetSettings()
- GetShadowInstance()
- NewIOLogEntry()
- OnError()
- OnGenerateSuperSession()
- OnGetConnections()
- OnKeepalive()
- OnMonitor()
- OnProductionStart()
- OnProductionStop()
- PopulateSuperSession()
- QueueName()
- SaveIOLogEntry()
- SendAlert()
- SendDeferredResponse()
- SendRequestAsync()
- SendRequestSync()