Interface IFixMessageFactory
FixMessageFactory interface defines object capable to create session level messages. User could extend existing standard MessageFactories or even write his own custom message factory
Namespace: FixAntenna.FixEngine
Assembly: FixAntenna.Core.dll
Syntax
public interface IFixMessageFactory
Properties
MinSeqNumFieldsLength
Minimal length for the SeqNum fields. The SeqNum fields are: BeginSeqNo(7), EndSeqNo(16), MsgSeqNum(34), NewSeqNo(36), RefSeqNum(45), LastMsgSeqNumProcessed(369), HopRefID(630), NextExpectedMsgSeqNum(789)
Declaration
int MinSeqNumFieldsLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
As far as HopRefID field doesn't processed directly by FA .NET Core,
it is up to user to format this field with leading zeroes if required.
The same for any SeqNum field processed by the user's logic:
it is up to user to keep required padding using
Methods
CompleteMessage(String, FixMessage)
Completes the message.
Declaration
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
byte[] GetCurrentSendingTime()
Returns
Type | Description |
---|---|
System.Byte[] | bytes of sending time |
GetEndSequenceNumber()
Get for current fix version the maximum sequence number.
Declaration
long GetEndSequenceNumber()
Returns
Type | Description |
---|---|
System.Int64 | sequence number |
GetRejectForMessageTag(FixMessage, Int32, Int32, String)
Creates reject message.
Declaration
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
ISendingTime GetSendingTime()
Returns
Type | Description |
---|---|
ISendingTime | SendingTime implementation |
Serialize(FixMessage, Nullable<ChangesType>, ByteBuffer, SerializationContext)
Build message based on a type and content.
Declaration
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
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
void SetRuntimeState(FixSessionRuntimeState runtimeState)
Parameters
Type | Name | Description |
---|---|---|
FixSessionRuntimeState | runtimeState |
SetSessionParameters(SessionParameters)
Setter for session parameters used to construct message headers.
Declaration
void SetSessionParameters(SessionParameters sessionParameters)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | sessionParameters | the session parameters |