Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / EnsLib.DotNetGateway.Service
Private  Storage   

EnsLib.DotNetGateway.Service


class EnsLib.DotNetGateway.Service extends
Ens.BusinessService

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

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 16 11


Summary


This is a Business Service class.

The associated Adapter class is EnsLib.DotNetGateway.ServiceAdapter.

Properties
%AlertStartTime %ConfigName %ConfigQueueName
%LastActionTime %LastHandledTime %LastReportedError
%OutsideCreated %PreserveSession %ProcessInputCalled
%QuitTask %RequestHeader %SessionId
%SuperSession %SuperSessionCreatedBeforeSession %WaitForNextCallInterval
%WarnedLatest %isShadow Adapter
AlertGracePeriod AlertGroups AlertOnError
AllowedIPAddresses ArchiveIO BusinessPartner
DotNetServer DotNetVersion Exec64
FilePath GenerateSuperSessionID HeartbeatFailureAction
HeartbeatFailureRetry HeartbeatFailureTimeout HeartbeatInterval
IOLogEntry InactivityTimeout Logfile
Port 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 ConnectGateway EnumerateSettingsClose
EnumerateSettingsExecute EnumerateSettingsFetch ForceSessionId GenerateSuperSession
GetDeferredResponseToken GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetSettings GetShadowInstance NewIOLogEntry OnError
OnGenerateSuperSession OnGetConnections OnInit OnKeepalive
OnMonitor OnProcessInput OnProductionStart OnProductionStop
OnTearDown PingDotNetGateway PopulateSuperSession QueueName
RunCommandViaCPIPE RunDotNet SaveIOLogEntry SendAlert
SendDeferredResponse SendRequestAsync SendRequestSync StartGateway
StopGateway


Parameters


• parameter ADAPTER = "EnsLib.DotNetGateway.ServiceAdapter";
This adapter does not handle communication with external systems, it's for internal use of this class only.
• parameter PIPEREADTIMEOUT = 10;
This timeout should work in most if not all cases.
• parameter SETTINGS = "DotNetServer:Basic,Port:Basic,AllowedIPAddresses,Exec64,DotNetVersion,FilePath:Basic,Logfile,UsePassphrase,HeartbeatInterval,HeartbeatFailureTimeout,HeartbeatFailureAction,HeartbeatFailureRetry,-ArchiveIO";
List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties


• property AllowedIPAddresses as %String [ InitialExpression = "0.0.0.0" ];
Which IP address, among the several IP addresses that the machine has, that allows incoming connections. Specify 0.0.0.0 or null to listen on all IP addresses local to the machine (127.0.0.1, VPN address, etc.). You can also specify a single existing local IP address to restrict the listener to that IP address.
• property DotNetServer as %String [ InitialExpression = "127.0.0.1" ];
IP address or name of the machine where the .NET Gateway Server executable is located.
• property DotNetVersion as %String(DISPLAYLIST=",2.0,4.0,4.5",VALUELIST=",2.0,4.0,4.5") [ InitialExpression = "2.0" ];
.NET version, used to select the intended directory for the target external executable.
• property Exec64 as %Boolean [ InitialExpression = 0 ];
On 64-bit platforms, indicates if the Gateway server is to be executed as 32-bit (default) or 64-bit.
• property FilePath as %String(MAXLEN=1023);
Location of the .NET Gateway Server executable. It is used to find the target executable and assemble the command to start the .NET Gateway on a local server.
If this setting is not specified, the default directory used is ...\Dev\dotnet\bin\ under the Ensemble installation directory.
• property HeartbeatFailureAction as %String(DISPLAYLIST=",None,Restart,Alert,Restart and Alert",VALUELIST=",,R,A,RA") [ InitialExpression = "R",Required ];
What action(s) to take if the .NET Gateway Server goes into failure state. Setting it to Restart (default) will cause the .NET 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 DotNetServer 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 .NET 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 .NET Gateway Server is in failure state. If this value is smaller than property HeartbeatInterval, it will be considered in failure state every time the .NET 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 ];
Number of seconds between each communication with the .NET 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 Ensemble and the .NET Gateway Server. Usually this setting should be left blank, and used only for trouble-shooting.
• property Port as %String [ InitialExpression = "55000" ];
TCP port number for communication between the .NET Gateway Server and the proxy classes in Ensemble.
• property UsePassphrase as %Boolean [ InitialExpression = 0 ];
If Gateway is to be started requiring a passphrase for connection

Methods


• classmethod ConnectGateway(pEndpoint As %String, ByRef pGateway As %Net.Remote.Gateway, pTimeout As %Numeric = 5, pAdditionalPaths As %String = "") as %Status
Connect to a running .NET Gateway Server.
• method OnInit() as %Status
Upon instantiating this service, adjust some properties and start the .NET 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 .NET Gateway Server.
• classmethod PingDotNetGateway(pPort As %String, pServer As %String = "127.0.0.1") as %Status
"Ping" the .NET Gateway Server to check if it's alive.
• classmethod RunCommandViaCPIPE(pCmd As %String, Output pDevice, Output pOutput, pTimeout As %Numeric = 10, Output pRetCode As %String, ByRef pCmdArgs) as %Status
Execute OS command asynchronously.
• classmethod RunDotNet(pFilePath As %String = "", pPort As %String = "", pAllowedIPAddresses As %String = "0.0.0.0", pLogfile As %String = "", ByRef pDevice As %String = "", pExec64 As %Boolean = 0, pVersion As %String = "2.0", pUsePassphrase As %Boolean = 0, ByRef pPassphraseList As %String = "") as %Status
Assemble the command to start the .NET Gateway Server based on the settings, and execute the command.
• classmethod StartGateway(pFilePath As %String, pPort As %String, pAllowedIPAddresses As %String, pLogfile As %String = "", ByRef pDevice As %String = "", pServer As %String = "127.0.0.1", pExec64 As %Boolean = 0, pVersion As %String = "2.0", pUsePassphrase As %Boolean = 0) as %Status
Start up the .NET Gateway Server.
• classmethod StopGateway(pPort As %String, pServer As %String = "127.0.0.1", pTimeout As %Numeric = 5) as %Status
Shutdown the Gateway.