Class AsyncMessagePumper
Inheritance
System.Object
AsyncMessagePumper
Implements
System.IDisposable
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()
Assembly: FixAntenna.Core.dll
Syntax
public class AsyncMessagePumper : AffinitySupportThread, IDisposable, IMessagePumper, IWorkerThread
Constructors
AsyncMessagePumper(IExtendedFixSession, IQueue<FixMessageWithType>, IMessageStorage, IFixMessageFactory, IFixTransport, IEncryption, ISessionSequenceManager)
Creates the AsyncMessagePumper
.
Declaration
public AsyncMessagePumper(IExtendedFixSession extendedFixSession, IQueue<FixMessageWithType> queue, IMessageStorage out, IFixMessageFactory messageFactory, IFixTransport transport, IEncryption encryption, ISessionSequenceManager sequenceManager)
Parameters
Fields
Declaration
protected IMaskedTags _maskedTags
Field Value
Declaration
protected RawFixUtil.IRawTags _rawTags
Field Value
TraceEnabled
Declaration
public static readonly bool TraceEnabled
Field Value
Type |
Description |
System.Boolean |
|
Methods
FillBuffer(Int32)
Declaration
public virtual int FillBuffer(int queueSize)
Parameters
Type |
Name |
Description |
System.Int32 |
queueSize |
|
Returns
Type |
Description |
System.Int32 |
|
GetMessageProcessedTimestamp()
Declaration
public virtual 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 virtual MessageStatistic GetMessageStatistic()
Returns
Exceptions
Type |
Condition |
System.InvalidOperationException |
if statisticEnabled is false
|
See Also
GetOutgoingMessageStorage()
Gets outgoing message storage.
Declaration
public virtual IMessageStorage GetOutgoingMessageStorage()
Returns
HasDataChunkToTransfer()
Declaration
public virtual bool HasDataChunkToTransfer()
Returns
Type |
Description |
System.Boolean |
|
HasWorkQueued()
Declaration
public virtual bool HasWorkQueued()
Returns
Type |
Description |
System.Boolean |
|
Init()
Declaration
public virtual long Init()
Returns
Type |
Description |
System.Int64 |
|
IsStatisticEnabled()
Declaration
public virtual bool IsStatisticEnabled()
Returns
Type |
Description |
System.Boolean |
true is statistic is enabled
|
RejectFirstQueueMessage()
Declaration
public virtual void RejectFirstQueueMessage()
RejectQueueMessages()
Reject all non send message.
Declaration
public virtual void RejectQueueMessages()
Run()
Declaration
protected override void Run()
Overrides
ScheduleChunkToTransfer(Int32, Int32)
Declaration
public virtual void ScheduleChunkToTransfer(int start, int end)
Parameters
Type |
Name |
Description |
System.Int32 |
start |
|
System.Int32 |
end |
|
Send(FixMessage, Nullable<ChangesType>)
Pool the message to queue.
Declaration
public virtual 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 virtual int Send(FixMessage content, ChangesType? changesType, FixSessionSendingType optionMask)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Send(String, FixMessage)
Declaration
public virtual 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 virtual int Send(string msgType, FixMessage content, FixSessionSendingType optionMask)
Parameters
Returns
Type |
Description |
System.Int32 |
|
SendMessages(Int32)
Declaration
public virtual void SendMessages(int messageCount)
Parameters
Type |
Name |
Description |
System.Int32 |
messageCount |
|
SendMessages(Int32, Byte[])
Declaration
public virtual bool SendMessages(int messageCount, byte[] externalBuffer)
Parameters
Type |
Name |
Description |
System.Int32 |
messageCount |
|
System.Byte[] |
externalBuffer |
|
Returns
Type |
Description |
System.Boolean |
|
SendOutOfTurn(String, FixMessage)
Declaration
public virtual 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 virtual void SetGracefulShutdown(bool gracefulShutdown)
Parameters
Type |
Name |
Description |
System.Boolean |
gracefulShutdown |
the graceful shutdown flag
|
SetMessageProcessedTimestamp(Int64)
Declaration
public virtual 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
enabled, the messages are rejecting, IRejectMessageListener.
This methods should be called from other thread
Declaration
public override void Shutdown()
Overrides
Implements
System.IDisposable