Interface IExtendedFixSession
Extended fix session.
Inherited Members
Namespace: FixAntenna.FixEngine.Session
Assembly: FixAntenna.Core.dll
Syntax
public interface IExtendedFixSession : IFixSession
Methods
ClearQueue()
Clears output message queue.
Method also reject all messages from the queue.
To use this feature, the user should set the RejectMessageListener
listener.
Declaration
void ClearQueue()
Disconnect(DisconnectReason, String)
Declaration
void Disconnect(DisconnectReason reasonType, string reasonDescription)
Parameters
Type | Name | Description |
---|---|---|
DisconnectReason | reasonType | |
System.String | reasonDescription |
ForcedDisconnect(DisconnectReason, String, Boolean)
Gracefully disconnects current session but wait for answer forcedLogoffTimeout.
Logoff with specified reason will be sent to your counterparty. Session will wait the answer for some period, defined by forcedLogoffTimeout configuration property. Note: This method doesn't guarantee immediate shutdown, since FIX protocol require us to wait for counterparty logoff reply. Note: Use this method if you need to close session in exceptional cases and when there is a chance that counterparty newer answer.
Declaration
void ForcedDisconnect(DisconnectReason reasonType, string reason, bool continueReading)
Parameters
Type | Name | Description |
---|---|---|
DisconnectReason | reasonType | |
System.String | reason | the reason |
System.Boolean | continueReading | if false then reading of incoming messages will be stopped. This can be used for prevent reading of messages with broken sequencing. |
GetAndRemoveAttribute(String)
Declaration
object GetAndRemoveAttribute(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type | Description |
---|---|
System.Object |
GetAttribute(ExtendedFixSessionAttribute)
Declaration
object GetAttribute(ExtendedFixSessionAttribute key)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | key |
Returns
Type | Description |
---|---|
System.Object |
GetAttribute(String)
Gets session attribute value.
Declaration
object GetAttribute(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | the attribute key |
Returns
Type | Description |
---|---|
System.Object | attribute value |
GetAttributeAsBool(ExtendedFixSessionAttribute)
Declaration
bool GetAttributeAsBool(ExtendedFixSessionAttribute attr)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | attr |
Returns
Type | Description |
---|---|
System.Boolean |
GetAttributeAsLong(ExtendedFixSessionAttribute)
Declaration
long GetAttributeAsLong(ExtendedFixSessionAttribute attr)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | attr |
Returns
Type | Description |
---|---|
System.Int64 |
GetBytesRead()
Gets read bytes.
Declaration
long GetBytesRead()
Returns
Type | Description |
---|---|
System.Int64 | number of read bytes or -1 if statistic is disabled |
GetBytesSent()
Gets send bytes.
Declaration
long GetBytesSent()
Returns
Type | Description |
---|---|
System.Int64 | number of send bytes or -1 if statistic is disabled |
GetEncryption()
Declaration
IEncryption GetEncryption()
Returns
Type | Description |
---|---|
IEncryption |
GetErrorHandler()
Gets session error handler.
Declaration
IErrorHandler GetErrorHandler()
Returns
Type | Description |
---|---|
IErrorHandler | error handler |
GetEstablished()
Gets established session timestamp in milliseconds.
Declaration
long GetEstablished()
Returns
Type | Description |
---|---|
System.Int64 | timestamp |
GetExtendedFixSessionListener()
Gets extended fix session listener.
Declaration
IExtendedFixSessionListener GetExtendedFixSessionListener()
Returns
Type | Description |
---|---|
IExtendedFixSessionListener |
GetFixSessionOutOfSyncListener()
Declaration
IFixSessionOutOfSyncListener GetFixSessionOutOfSyncListener()
Returns
Type | Description |
---|---|
IFixSessionOutOfSyncListener |
GetIncomingMessageStorage()
Gets incoming message storage.
Declaration
IMessageStorage GetIncomingMessageStorage()
Returns
Type | Description |
---|---|
IMessageStorage | message storage |
GetLastDisconnectReason()
Declaration
DisconnectReason GetLastDisconnectReason()
Returns
Type | Description |
---|---|
DisconnectReason |
GetLastInMessageTimestamp()
Gets last received message timestamp in milliseconds.
Declaration
long GetLastInMessageTimestamp()
Returns
Type | Description |
---|---|
System.Int64 | timestamp |
GetLastOutMessageTimestamp()
Gets time when the message is sent
Declaration
long GetLastOutMessageTimestamp()
Returns
Type | Description |
---|---|
System.Int64 | time when the message is sent or -1 if statistic is disabled |
GetMessageFactory()
Gets message factory.
Declaration
IFixMessageFactory GetMessageFactory()
Returns
Type | Description |
---|---|
IFixMessageFactory | message factory |
GetMessageQueue()
Gets internal message queue.
Declaration
IQueue<FixMessageWithType> GetMessageQueue()
Returns
Type | Description |
---|---|
IQueue<FixMessageWithType> | message storage |
GetNoOfInMessages()
Gets number of received message.
Declaration
long GetNoOfInMessages()
Returns
Type | Description |
---|---|
System.Int64 | number of received message or -1 if statistic is disabled |
GetNoOfOutMessages()
Gets number of sent message.
Declaration
long GetNoOfOutMessages()
Returns
Type | Description |
---|---|
System.Int64 | number of sent message or -1 if statistic is disabled |
GetOutgoingMessageStorage()
Gets outgoing message storage.
Declaration
IMessageStorage GetOutgoingMessageStorage()
Returns
Type | Description |
---|---|
IMessageStorage | message storage |
GetQueuedMessagesCount()
Declaration
int GetQueuedMessagesCount()
Returns
Type | Description |
---|---|
System.Int32 |
GetRejectMessageListener()
Gets reject message listener.
Declaration
IRejectMessageListener GetRejectMessageListener()
Returns
Type | Description |
---|---|
IRejectMessageListener | reject message listener |
GetRuntimeState()
Gets session parameter instance.
Declaration
FixSessionRuntimeState GetRuntimeState()
Returns
Type | Description |
---|---|
FixSessionRuntimeState |
GetSessionParametersInstance()
Gets session parameter instance.
Declaration
SessionParameters GetSessionParametersInstance()
Returns
Type | Description |
---|---|
SessionParameters |
IsStatisticEnabled()
Shows statistics on or off.
Declaration
bool IsStatisticEnabled()
Returns
Type | Description |
---|---|
System.Boolean | true is statistic is enabled |
See Also
LockSending()
Declaration
void LockSending()
MarkShutdownAsGraceful()
Marks the session shutdown as gracefully.
Declaration
void MarkShutdownAsGraceful()
RemoveAttribute(String)
Removes session attribute.
Declaration
void RemoveAttribute(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | the attribute key |
SaveSessionParameters()
Save session parameters to file.
Declaration
void SaveSessionParameters()
Exceptions
Type | Condition |
---|---|
System.IO.IOException | if I/O error occurred |
SendMessageAndGetQueueSize(FixMessage, FixSessionSendingType)
Do the same that SendMessage(FixMessage, FixSessionSendingType) and return queue size.
Declaration
int SendMessageAndGetQueueSize(FixMessage message, FixSessionSendingType optionMask)
Parameters
Type | Name | Description |
---|---|---|
FixMessage | message | |
FixSessionSendingType | optionMask |
Returns
Type | Description |
---|---|
System.Int32 | queue size. 0 if message was send synchronously |
See Also
SendMessageAndGetQueueSize(String, FixMessage, FixSessionSendingType)
Do the same that SendMessage(String, FixMessage, FixSessionSendingType) and return queue size.
Declaration
int SendMessageAndGetQueueSize(string type, FixMessage content, FixSessionSendingType optionMask)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | |
FixMessage | content | |
FixSessionSendingType | optionMask |
Returns
Type | Description |
---|---|
System.Int32 | queue size. 0 if message was send synchronously |
See Also
SendMessageOutOfTurn(String, FixMessage)
Sends message out of turn.
Declaration
bool SendMessageOutOfTurn(string msgType, FixMessage message)
Parameters
Type | Name | Description |
---|---|---|
System.String | msgType | the message type |
FixMessage | message | the message |
Returns
Type | Description |
---|---|
System.Boolean | true if message was send immediately, false - message was queued for later sending |
SendWithChangesAndGetQueueSize(FixMessage, ChangesType, FixSessionSendingType)
Do the same that SendWithChanges(FixMessage, ChangesType, FixSessionSendingType) and return queue size.
Declaration
int SendWithChangesAndGetQueueSize(FixMessage content, ChangesType allowedChangesType, FixSessionSendingType options)
Parameters
Type | Name | Description |
---|---|---|
FixMessage | content | |
ChangesType | allowedChangesType | |
FixSessionSendingType | options |
Returns
Type | Description |
---|---|
System.Int32 | queue size. 0 if message was send synchronously |
See Also
SetAttribute(ExtendedFixSessionAttribute, Boolean)
Declaration
void SetAttribute(ExtendedFixSessionAttribute attr, bool value)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | attr | |
System.Boolean | value |
SetAttribute(ExtendedFixSessionAttribute, Int64)
Declaration
void SetAttribute(ExtendedFixSessionAttribute attr, long value)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | attr | |
System.Int64 | value |
SetAttribute(ExtendedFixSessionAttribute, Object)
Declaration
void SetAttribute(ExtendedFixSessionAttribute key, object value)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | key | |
System.Object | value |
SetAttribute(String, Object)
Sets session attribute.
Declaration
void SetAttribute(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | the attribute key |
System.Object | value | the attribute value |
SetFixSessionOutOfSyncListener(IFixSessionOutOfSyncListener)
Declaration
void SetFixSessionOutOfSyncListener(IFixSessionOutOfSyncListener listener)
Parameters
Type | Name | Description |
---|---|---|
IFixSessionOutOfSyncListener | listener |
SetOutOfTurnMode(Boolean)
Sets OutOf turn mode.
Declaration
void SetOutOfTurnMode(bool mode)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | mode | the mode |
SetSessionState(SessionState)
Sets session state.
Declaration
void SetSessionState(SessionState sessionState)
Parameters
Type | Name | Description |
---|---|---|
SessionState | sessionState | the new session state |
Shutdown(DisconnectReason, Boolean)
Shutdown the session with specified reason.
Declaration
void Shutdown(DisconnectReason reason, bool blocking)
Parameters
Type | Name | Description |
---|---|---|
DisconnectReason | reason | disconnect reason |
System.Boolean | blocking | If the parameter is true, the next call of method is blocking. |
SubscribeForAttributeChanges(ExtendedFixSessionAttribute, IExtendedFixSessionAttributeListener)
Declaration
void SubscribeForAttributeChanges(ExtendedFixSessionAttribute attr, IExtendedFixSessionAttributeListener listener)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFixSessionAttribute | attr | |
IExtendedFixSessionAttributeListener | listener |
TryStartSendingLogout()
Returns true if the fix session has marked as started sending first or reply logout message Returns false if the fix session was already marked before this call
Declaration
bool TryStartSendingLogout()
Returns
Type | Description |
---|---|
System.Boolean |
UnlockSending()
Declaration
void UnlockSending()