Home > Class Reference > ENSLIB namespace > Ens.MessageHeader

Ens.MessageHeader

persistent class Ens.MessageHeader extends %Library.Persistent, Ens.MessageHeaderBase, %XML.Adaptor

SQL Table Name: Ens.MessageHeader

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter EXTENTSIZE = 20000000;
Inherited description: The EXTENTSIZE parameter is used to inform the SQL Query Optimizer of the approximate number of instances in the extent containing instances of this class.

For example, a class that expects to have about 1,000,000 instances should define:

parameter EXTENTSIZE = 1000000;

Properties (Including Private)

property Banked as %Integer (XMLPROJECTION = "NONE") [ Calculated , Transient , ReadOnly ];
Have this header and its MessageBody and SearchTable been archived to the Enterprise Message Bank already? Header=1, Body=2, SearchTable=4, all=7
Property methods: BankedCompute(), BankedDisplayToLogical(), BankedGet(), BankedIsValid(), BankedLogicalToDisplay(), BankedNormalize(), BankedSQLCompute(), BankedXSDToLogical()

Methods (Including Private)

private method %OnAfterSave(insert As %Boolean) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %Save() method to provide notification that the object is being saved. It is called after the object's data has been successfully written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save() will fail.

private classmethod %OnDelete(oid As %ObjectIdentity) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %Delete() method to provide notification that the object specified by oid is being deleted.

If this method returns an error then the object will not be deleted.

method BankedGet() as %Integer [ Language = objectscript ]
method MessageId() as %String [ Language = objectscript ]
The same as %Id(), but works even if the object hasn't been saved already
method NewErrorResponse(Output pHeader As Ens.MessageHeader, pStatus As %Status) as %Status [ Language = objectscript ]
creates an error message response header from a request message header
classmethod NewRequestMessage(ByRef pHeader As Ens.MessageHeader, pMessageBody As %Library.Persistent, ByRef pSessionId As %String, ByRef pSuperSession As %String) as %Status [ Language = objectscript ]
Create a new request header
method NewResponseMessage(Output pHeader As Ens.MessageHeader, pMessageBody As %Library.Persistent, pSuperSession As %String = "") as %Status [ Language = objectscript ]
Create a response message header from a request message header
classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pKeepIntegrity As %Boolean = 1, pBodiesToo As %Boolean = 0, pBitmapChunkLimit As %Integer = 500) as %Status [ Language = objectscript ]
classmethod PurgeSetTemp(pType As %Integer, pMsg As %String, pSC As %Status, pSC2 As %Status) as %Status [ Language = objectscript ]
Deprecated. No longer used by InterSystems Code. Replaced by ReportPurgeError Log a warning in the Event Log; add to tSC status; set error/warning in a temp global as below:
Total error count is in subscript 0.
Errors while deleting message headers are in subscript 1.
Errors while deleting message bodies are in subscript 2.
Errors while deleting search table entries are in subscript 3.
classmethod ResendDuplicatedMessage(pOriginalHeaderId As %String, Output pNewHeaderId As %String, pNewTarget As %String, pNewBody As %RegisteredObject, pNewSource As %String, pHeadOfQueue As %Boolean) as %Status [ Language = objectscript ]
Resend the message header identified by pOriginalHeaderId by constructing a copy of it and submitting the copy to its target queue. Optional arguments pNewTarget, pNewBody and pNewSource specify replacement values for key header properties. The Description property is updated with an annotation giving the original header ID. Finally the boolean pHeadOfQueue argument specifies whether the new header should be submitted at the end of the target queue or at the head of the line.
classmethod ResubmitMessage(pHeaderId As %String, pNewTarget As %String, pNewBody As %RegisteredObject, pHeadOfQueue As %Boolean) as %Status [ Language = objectscript ]
Resubmit the message header identified by pHeaderId to its target queue. Optional arguments pNewTarget and pNewBody specify replacement values for key header properties. If these are given, the Description property is updated with annotations giving the previous values. Finally the boolean pHeadOfQueue argument specifies whether the header should be resubmitted at the end of the target queue or at the head of the line.
method SetStatus(pStatus As Ens.DataType.MessageStatus) [ Language = objectscript ]
set and immediately save the status field of this object
method needsReply() as %Boolean [ Language = objectscript ]

Indexes

index (MessageBodyClassName on MessageBodyClassName) [Type = bitmap];
Index methods: MessageBodyClassNameDisplayToLogical(), MessageBodyClassNameGet(), MessageBodyClassNameGetStored(), MessageBodyClassNameIsValid(), MessageBodyClassNameLogicalToDisplay(), MessageBodyClassNameLogicalToOdbc(), MessageBodyClassNameNormalize(), MessageBodyClassNameSet()
index (MessageBodyId on MessageBodyId);
Index methods: MessageBodyIdDisplayToLogical(), MessageBodyIdExists(), MessageBodyIdGet(), MessageBodyIdGetStored(), MessageBodyIdIsValid(), MessageBodyIdLogicalToDisplay(), MessageBodyIdLogicalToOdbc(), MessageBodyIdNormalize(), MessageBodyIdSet()
index (SessionId on SessionId);
Index methods: SessionIdDisplayToLogical(), SessionIdExists(), SessionIdGet(), SessionIdGetStored(), SessionIdIsValid(), SessionIdLogicalToDisplay(), SessionIdNormalize(), SessionIdSet(), SessionIdXSDToLogical()
index (SourceConfigName on SourceConfigName) [Type = bitmap];
Index methods: SourceConfigNameDisplayToLogical(), SourceConfigNameGet(), SourceConfigNameGetStored(), SourceConfigNameIsValid(), SourceConfigNameLogicalToDisplay(), SourceConfigNameLogicalToOdbc(), SourceConfigNameNormalize(), SourceConfigNameSet()
index (Status on Status) [Type = bitmap];
Index methods: StatusDisplayToLogical(), StatusGet(), StatusGetStored(), StatusIsValid(), StatusLogicalToDisplay(), StatusNormalize(), StatusSet(), StatusXSDToLogical()
index (TargetConfigName on TargetConfigName) [Type = bitmap];
Index methods: TargetConfigNameDisplayToLogical(), TargetConfigNameGet(), TargetConfigNameGetStored(), TargetConfigNameIsValid(), TargetConfigNameLogicalToDisplay(), TargetConfigNameLogicalToOdbc(), TargetConfigNameNormalize(), TargetConfigNameSet()
index (TimeCreated on TimeCreated);
Index methods: TimeCreatedDisplayToLogical(), TimeCreatedExists(), TimeCreatedGet(), TimeCreatedGetStored(), TimeCreatedIsValid(), TimeCreatedLogicalToDisplay(), TimeCreatedLogicalToOdbc(), TimeCreatedNormalize(), TimeCreatedOdbcToLogical(), TimeCreatedSet(), TimeCreatedStorageToLogical(), TimeCreatedtimeCmp(), TimeCreatedtimeDiff(), TimeCreatedtimeLocal(), TimeCreatedtimeLocaltoUTC(), TimeCreatedtimeUTC(), TimeCreatedtimeUTCH(), TimeCreatedtimeUTCHtoUTC(), TimeCreatedtimeUTCtoLocal(), TimeCreatedtimeUTCtoUTCH()

Triggers

trigger OnDelete (BEFORE event DELETE);

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)

Storage

Storage Model: Storage (Ens.MessageHeader)

^Ens.MessageHeaderD(ID)
=
%%CLASSNAME
BusinessProcessId
Category
CorrespondingMessageId
ErrorStatus
Invocation
IsError
MessageBody
Priority
ReturnQueueName
SessionId
SourceConfigName
Status
TargetConfigName
TargetQueueName
TimeCreated
TimeProcessed
Type
MessageBodyId
SourceBusinessType
TargetBusinessType
MessageBodyClassName
Description
SuperSession
Resent
Feedback