Class AbstractFixMessageFactory
The abstract fix message factory implementation.
This class provides the base functionality to work with message.
All sub classes should implement GetBytes method to provide ability
to wrap fix content (adds or updates sequence, body length and checksum fields).
Implements
Inherited Members
Namespace: FixAntenna.FixEngine.Session.Common
Assembly: FixAntenna.Core.dll
Syntax
public abstract class AbstractFixMessageFactory : IFixMessageFactory
Constructors
AbstractFixMessageFactory()
Declaration
public AbstractFixMessageFactory()
Fields
Encryption
Declaration
protected EncryptionType Encryption
Field Value
| Type | Description |
|---|---|
| EncryptionType |
Equal
Declaration
protected const char Equal = '='
Field Value
| Type | Description |
|---|---|
| System.Char |
Separator
Declaration
protected const char Separator = '\u0001'
Field Value
| Type | Description |
|---|---|
| System.Char |
SeparatorLength
Declaration
protected const int SeparatorLength = 1
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Properties
MinSeqNumFieldsLength
Minimum length of the SeqNum type fields.
Declaration
public int MinSeqNumFieldsLength { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
CompleteMessage(String, FixMessage)
Completes the message.
Declaration
public abstract FixMessage CompleteMessage(string msgType, FixMessage content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | msgType | the message type |
| FixMessage | content | the content of message |
Returns
| Type | Description |
|---|---|
| FixMessage | message |
GetCurrentSendingTime()
Gets current sending time.
Declaration
public abstract byte[] GetCurrentSendingTime()
Returns
| Type | Description |
|---|---|
| System.Byte[] | bytes of sending time |
GetEndSequenceNumber()
Get for current fix version the maximum sequence number.
Declaration
public virtual long GetEndSequenceNumber()
Returns
| Type | Description |
|---|---|
| System.Int64 | sequence number |
GetRejectForMessageTag(FixMessage, Int32, Int32, String)
Creates reject message.
Declaration
public virtual FixMessage GetRejectForMessageTag(FixMessage rejectMessage, int refTagId, int rejectReason, string rejectText)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessage | rejectMessage | the rejected message |
| System.Int32 | refTagId | the reference tag |
| System.Int32 | rejectReason | the reject reason |
| System.String | rejectText | the reject text |
Returns
| Type | Description |
|---|---|
| FixMessage |
GetSendingTime()
Returns appropriate SendingTime implementation
Declaration
public abstract ISendingTime GetSendingTime()
Returns
| Type | Description |
|---|---|
| ISendingTime | SendingTime implementation |
SafeAdd(FixMessage, Int32, String)
Declaration
public virtual void SafeAdd(FixMessage message, int tag, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessage | message | |
| System.Int32 | tag | |
| System.String | value |
SafeAdd(StringBuilder, Int32, String)
Declaration
public virtual void SafeAdd(StringBuilder sb, int tag, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.StringBuilder | sb | |
| System.Int32 | tag | |
| System.String | value |
Serialize(FixMessage, Nullable<ChangesType>, ByteBuffer, SerializationContext)
Build message based on a type and content.
Declaration
public abstract void Serialize(FixMessage content, ChangesType? changesType, ByteBuffer buffer, SerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessage | content | the message content |
| System.Nullable<ChangesType> | changesType | the change type |
| ByteBuffer | buffer | |
| SerializationContext | context |
Serialize(MsgBuf, String, FixMessage, ByteBuffer, SerializationContext)
Build message based on a type and content.
Declaration
public abstract void Serialize(MsgBuf buf, string msgType, FixMessage content, ByteBuffer buffer, SerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| MsgBuf | buf | |
| System.String | msgType | the message type |
| FixMessage | content | the message content |
| ByteBuffer | buffer | |
| SerializationContext | context |
SetRuntimeState(FixSessionRuntimeState)
Declaration
public abstract void SetRuntimeState(FixSessionRuntimeState runtimeState)
Parameters
| Type | Name | Description |
|---|---|---|
| FixSessionRuntimeState | runtimeState |
SetSessionParameters(SessionParameters)
Setter for session parameters used to construct message headers.
Declaration
public abstract void SetSessionParameters(SessionParameters sessionParameters)
Parameters
| Type | Name | Description |
|---|---|---|
| SessionParameters | sessionParameters | the session parameters |