Class Reference
IRIS for UNIX 2019.1
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [Ens] >  [Host]
Private  Storage   

abstract class Ens.Host extends %RegisteredObject

Common base class for all config item instances

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 16 34


Summary

Properties
%ConfigName %ConfigQueueName %LastActionTime %LastHandledTime
%LastReportedError %QuitTask %SessionId %SuperSession
%WarnedLatest %isShadow Adapter AlertGroups
AlertOnError BusinessPartner InactivityTimeout ThrottleDelay

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
GenerateSuperSession GetDeferredResponseToken GetProductionSettingValue GetProductionSettings
GetPropertyConnections GetShadowInstance OnGenerateSuperSession OnGetConnections
OnInit OnKeepalive OnMonitor OnProductionStart
OnProductionStop OnTearDown QueueName SendDeferredResponse
SendRequestSync

Subclasses
Ens.Actor Ens.Alarm Ens.BusinessOperation Ens.BusinessProcess
Ens.BusinessService

Parameters

• parameter ADAPTER;
The type of adapter used to communicate with external systems
• parameter INVOCATION = "Queue";
2 modes: Queue, InProc
• parameter SETTINGS = "ThrottleDelay,AlertOnError:Alerting,InactivityTimeout:Alerting,BusinessPartner:Info:partnerSelector,AlertGroups:Alerting:selector?multiSelect=1&context={Ens.ContextSearch/ProductionAlertGroups?productionName=@productionId}";
Users can specify these values in the Configuration Editor

Properties

• property %ConfigName as %String(MAXLEN=128);
return the name of config item
• property %ConfigQueueName as %String(MAXLEN=128);
return the name of queue as returned by the config item
• property %LastActionTime as %String [ Transient ];
If doing keepalives, the time of the last return from MessageHeaderHandler() or OnKeepalive()
• property %LastHandledTime as %String [ Transient ];
If doing keepalives, the time of the last return from MessageHeaderHandler()
• property %LastReportedError as %String [ Transient ];
Copy of the text of the last error we reported, so we can avoid alerting more than once
• property %QuitTask as %Integer [ InitialExpression = 0 ];
Flag for returning an error that will exit the OnTask() loop and terminate the Job
• property %SessionId as %Integer;
The session id of the current message being processed
• property %SuperSession as %String(MAXLEN=300);
The SuperSession id of the current message being processed
• property %WarnedLatest as %Boolean [ InitialExpression = 0,Transient ];
Flag whether we have already warned about the class being recompiled
• property %isShadow as %String [ Transient ];
Is this a real live instance or a shadow instance used just to hold config settings.
• property Adapter as Ens.Adapter;
The adapter instance
• property AlertGroups as %String(MAXLEN=2500);
The Alert Groups to which this item belongs.
• property AlertOnError as %Boolean [ InitialExpression = 0 ];
Send an Alert message whenever an error occurs here
• property BusinessPartner as %String(MAXLEN=128);
Name of a Business Partner Profile associated with this item
• property InactivityTimeout as %Numeric(MINVAL=0) [ InitialExpression = 0 ];
Send an Alert message if this number of seconds elapses with no messages being processed by this item.
Note that this alert will be sent even if AlertOnError is False.
Zero means no alerts of this type will be sent.
• property ThrottleDelay as %Numeric [ InitialExpression = 0 ];
Duration of forced idleness before processing the next message, in milliseconds

Methods

• method %OnClose() as %Status
This callback method is invoked by the %Close method to provide notification that the current object is being closed.

The return value of this method is ignored.

• method %OnNew(pConfigName As %String) as %Status
initialize Business Host object
• method %SuperSessionSet(Arg As %String) as %Status
This is to allow a process access to local variable storing Super Session. Similar to how a process has access to $$$JobSessionId.
• classmethod AdapterName() as %String
• method GenerateSuperSession(pMessageHeader As Ens.MessageHeader = $$$NULLOREF, Output pSC As %Status = $$$OK, pDelimiter As %String = "^") as %String
This method will generate a super session ID
• method GetDeferredResponseToken(pMessageHeader As Ens.MessageHeader) as %String
• method GetProductionSettingValue(pName As %String, Output pStatus As %Status) as %String
• method GetProductionSettings(Output pSettings) as %Status
• classmethod GetPropertyConnections(Output pArray As %String, pItem As Ens.Config.Item)
Helper method for OnGetConnections
• classmethod GetShadowInstance(pConfigItemName As %String, Output pStatus As %Status) as Ens.Host
Get a "shadow" instance of the named ConfigItem, live if the Production is running; otherwise static but fully populated with all its Settings values. See method Ens.Director:ParseConfigName() for full syntax of the ConfigItem name specification string.
• method OnGenerateSuperSession(pMessageHeader As Ens.MessageHeader = $$$NULLOREF, Output pSC As %Status = $$$OK, pDelimiter As %String) as %String
User call back to override creation of Super Session value.
Return a non empty string from this method to use as the Super Session ID.
Any code needs to ensure the length of the string returned is not more than the MAXLEN of %SuperSession
If Empty string is returned the system will create one in GenerateSuperSession.
pMessageHeader may be populated when this is called.
The default of pDelimiter passed in is a ^
• classmethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
This method is called when Portal is drawing the production diagram pArray contains the config names the scanner found. Users can remove or add new names
• method OnInit() as %Status
This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
• method OnKeepalive(pAdapterStatus As %Status) as %Status
This method will be called within KeepaliveInterval of the last return from OnTask() or OnKeepalive(). It is called via the Adapter's OnKeepalive() method, which is called from the Host.OnTask() method; if there is no Adapter there is no keepalive call.
• classmethod OnMonitor(pHostName As %String) as %Status
This user callback method is called by the Monitor Service (Ens.MonitorService) immediately after it has checked on the status of this host class.
• classmethod OnProductionStart(pConfigName As %String) as %Status
This user callback method is called when the system is being started
• classmethod OnProductionStop(pConfigName As %String) as %Status
This user callback method is called when the system is being stopped
• method OnTearDown() as %Status
This user callback method is called from %OnClose()
• method QueueName() as %String
• classmethod SendDeferredResponse(pDeferredResponseToken As %String, pResponse As %Library.Persistent) as %Status
• method SendRequestSync(pTargetDispatchName As %String, pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent, pTimeout As %Numeric = -1, pDescription As %String = "") as %Status


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