public class PduMessageHeader extends TLVStructure
TLV [01] header {
TLV [01] login_id { utf8 string }
TLV [02] inst_id { integer } // optional
TLV [03] msg_id { integer } // optional
}
The instance and message identifier fields, when present, are used for filtering duplicate messages. The
value of the `instance identifier' field should increase every time the sending process is restarted. The `message
identifier' should sequentially number the messages within a process invocation. Having seen messages with a higher
`instance identifier' value from a client, a server may drop future messages with lower `instance identifier'
values assuming these are delayed messages from a previous invocation and thus no longer relevant. Similarly, a
server may prioritize messages from a given client invocation by `message identifier' values under the assumption
that messages with lower values are more likely to be stale.
| Modifier and Type | Field and Description |
|---|---|
static int |
ELEMENT_TYPE_MESSAGE_HEADER |
rootElement| Constructor and Description |
|---|
PduMessageHeader(String loginId)
Constructor for creating a new message header object with client identifier.
|
PduMessageHeader(String loginId,
KSIRequestContext context)
Constructor for creating a new message header object with given
KSIRequestContext. |
PduMessageHeader(String loginId,
Long instanceId,
Long messageId)
Constructor for creating a new message header object with client, instance and message identifier.
|
PduMessageHeader(TLVElement rootElement)
Creates new message header object from base TLV element.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getElementType() |
Long |
getInstanceId() |
String |
getLoginId() |
Long |
getMessageId() |
equals, getRootElement, hashCode, readOnce, verifyCriticalFlag, writeTopublic static final int ELEMENT_TYPE_MESSAGE_HEADER
public PduMessageHeader(String loginId) throws KSIException
loginId - identifier of the client host for MAC key lookup.KSIExceptionpublic PduMessageHeader(String loginId, Long instanceId, Long messageId) throws KSIException
loginId - identifier of the client host for MAC key lookup.instanceId - a number identifying invocation of the sender; can not be null when message identifier is present.messageId - message number for duplicate filtering; can not be null when instance identifier is present.KSIExceptionpublic PduMessageHeader(String loginId, KSIRequestContext context) throws KSIException
KSIRequestContext.KSIExceptionpublic PduMessageHeader(TLVElement rootElement) throws KSIException
rootElement - instance ofTLVElement.KSIExceptionpublic Long getInstanceId()
public Long getMessageId()
public String getLoginId()
public int getElementType()
getElementType in class TLVStructureCopyright © 2024 Guardtime. All rights reserved.