Class Msg
Represents a message base that requests and responses derive from. Messages are exchanged between glued tiers
Inherited Members
Namespace: NFX.Glue.Protocol
Assembly: NFX.dll
Syntax
[Serializable]
public abstract class Msg
Constructors
Msg()
Constructs new message and allocates unique ID
Declaration
protected Msg()
Properties
ArrivalTimeStamp
Returns arrival timestamp expressed in ticks, that is - when message just arrived before its processing started by Glue (before deserialization). This property allows for glue-internal latency assessment
Declaration
public long ArrivalTimeStamp { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
BindingSpecificContext
Returns a binding-specific context object which is used for message processing/routing by binding. This property value is not serialized and used internally by Glue framework. Not all bindings use/need this property
Declaration
public object BindingSpecificContext { get; }
Property Value
Type | Description |
---|---|
System.Object |
CorrelationData
Arbitrary named object collection that can be used to correlate messages and/or attach extra data. This field is NOT transmitted over wire nor is it used by the framework. Message inspectors may use this property at their own discretion, for example in cases when the same inspector type is registered on multiple levels (endpoint, binding, glue), inspectors may check this property to execute only once per message. The collection is lazily allocated at the first reference attempt
Declaration
public Dictionary<string, object> CorrelationData { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
HasCorrelationData
Returns true when this message contains header data
Declaration
public bool HasCorrelationData { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasHeaders
Returns true when this message contains header data
Declaration
public bool HasHeaders { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Headers
Returns a list of headers that this message contains
Declaration
public Headers Headers { get; set; }
Property Value
Type | Description |
---|---|
Headers |
ID
Returns a unique ID for this message
Declaration
public FID ID { get; }
Property Value
Type | Description |
---|---|
FID |
RequestID
Returns request ID that relates to this message instance. It is the message ID for RequestMsg and related message ID for ResponseMsg
Declaration
public abstract FID RequestID { get; }
Property Value
Type | Description |
---|---|
FID |
Methods
__SetArrivalTimeStampTicks(Int64)
Framework method not for developers. Sets arrival ticks stamp. Usually called from transport
Declaration
public void __SetArrivalTimeStampTicks(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value |
__SetBindingSpecificContext(Msg)
Internal method not to be called by app developers. Called from custom bindings to inject binding-specific context
Declaration
public void __SetBindingSpecificContext(Msg other)
Parameters
Type | Name | Description |
---|---|---|
Msg | other |
__SetBindingSpecificContext(Object)
Internal method not to be called by app developers. Called from custom bindings to inject binding-specific context
Declaration
public void __SetBindingSpecificContext(object context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | context |
CloneState(Msg, Boolean, Boolean)
Clones message state from another message instance. State includes binding-specific context and optionally headers and correlation data
Declaration
public void CloneState(Msg from, bool cloneHeaders = true, bool cloneCorrelation = true)
Parameters
Type | Name | Description |
---|---|---|
Msg | from | |
System.Boolean | cloneHeaders | |
System.Boolean | cloneCorrelation |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |