Class SyncBlockingMessagePumper
The message pumper writes messages to transport.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FixAntenna.FixEngine.Session.IOThreads
Assembly: FixAntenna.Core.dll
Syntax
public sealed class SyncBlockingMessagePumper : AffinitySupportThread, IDisposable, IMessagePumper, IWorkerThread
Constructors
SyncBlockingMessagePumper(IExtendedFixSession, IQueue<FixMessageWithType>, IMessageStorage, IFixMessageFactory, IFixTransport, IEncryption, ISessionSequenceManager)
Creates the SyncBlockingMessagePumper.
Declaration
public SyncBlockingMessagePumper(IExtendedFixSession extendedFixSession, IQueue<FixMessageWithType> queue, IMessageStorage out, IFixMessageFactory messageFactory, IFixTransport transport, IEncryption encryption, ISessionSequenceManager sequenceManager)
Parameters
| Type | Name | Description |
|---|---|---|
| IExtendedFixSession | extendedFixSession | |
| IQueue<FixMessageWithType> | queue | the output queue |
| IMessageStorage | out | |
| IFixMessageFactory | messageFactory | the output message storage |
| IFixTransport | transport | the transport |
| IEncryption | encryption | |
| ISessionSequenceManager | sequenceManager |
Fields
TraceEnabled
Declaration
public static readonly bool TraceEnabled
Field Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
FillBuffer(FixMessageWithType, MsgBuf)
Declaration
public bool FillBuffer(FixMessageWithType messageWithType, MsgBuf buf)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessageWithType | messageWithType | |
| MsgBuf | buf |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetMessageProcessedTimestamp()
Declaration
public long GetMessageProcessedTimestamp()
Returns
| Type | Description |
|---|---|
| System.Int64 |
GetMessageStatistic()
Gets statistic of processed messages. WARNING: Before the call to ensure that the statistics are included.
Declaration
public MessageStatistic GetMessageStatistic()
Returns
| Type | Description |
|---|---|
| MessageStatistic | MessageStatistic |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | if |
See Also
GetOutgoingMessageStorage()
Gets outgoing message storage.
Declaration
public IMessageStorage GetOutgoingMessageStorage()
Returns
| Type | Description |
|---|---|
| IMessageStorage |
HasAnyWorkQueued()
Declaration
public bool HasAnyWorkQueued()
Returns
| Type | Description |
|---|---|
| System.Boolean |
HasWorkQueued()
Declaration
public bool HasWorkQueued()
Returns
| Type | Description |
|---|---|
| System.Boolean |
Init()
Declaration
public long Init()
Returns
| Type | Description |
|---|---|
| System.Int64 |
IsStatisticEnabled()
Declaration
public bool IsStatisticEnabled()
Returns
| Type | Description |
|---|---|
| System.Boolean | true is statistic is enabled |
RejectFirstQueueMessage()
Declaration
public void RejectFirstQueueMessage()
RejectQueueMessages()
Reject all non send message.
Declaration
public void RejectQueueMessages()
Run()
Declaration
protected override void Run()
Overrides
Send(FixMessage, Nullable<ChangesType>)
Pool the message to queue.
Declaration
public int Send(FixMessage content, ChangesType? changesType)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessage | content | the message content |
| System.Nullable<ChangesType> | changesType | the change type |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Send(FixMessage, Nullable<ChangesType>, FixSessionSendingType)
Declaration
public int Send(FixMessage content, ChangesType? changesType, FixSessionSendingType optionMask)
Parameters
| Type | Name | Description |
|---|---|---|
| FixMessage | content | |
| System.Nullable<ChangesType> | changesType | |
| FixSessionSendingType | optionMask |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Send(String, FixMessage)
Declaration
public int Send(string msgType, FixMessage content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | msgType | |
| FixMessage | content |
Returns
| Type | Description |
|---|---|
| System.Int32 |
Send(String, FixMessage, FixSessionSendingType)
Pool the message to queue.
Declaration
public int Send(string msgType, FixMessage content, FixSessionSendingType optionMask)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | msgType | the message type |
| FixMessage | content | the message content |
| FixSessionSendingType | optionMask |
Returns
| Type | Description |
|---|---|
| System.Int32 |
SendMessages(Int32)
Declaration
public void SendMessages(int messageCount)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | messageCount |
SendOutOfTurn(String, FixMessage)
Declaration
public bool SendOutOfTurn(string msgType, FixMessage content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | msgType | |
| FixMessage | content |
Returns
| Type | Description |
|---|---|
| System.Boolean |
SetGracefulShutdown(Boolean)
Sets gracefulShutdown flag.
Declaration
public void SetGracefulShutdown(bool gracefulShutdown)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | gracefulShutdown | the graceful shutdown flag |
SetMessageProcessedTimestamp(Int64)
Declaration
public void SetMessageProcessedTimestamp(long timestamp)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | timestamp |
Shutdown()
Shutdown the pumper.
This method calls engine before the session is close. This is blocked method. If queue has the messages and if message rejecting is
Declaration
public override void Shutdown()
Overrides
See Also
Implements
System.IDisposable