Public Types | |
| enum | SessionStorageType { FileBasedStorage, MemoryBasedStorage } |
| Session Storage type. More... | |
| enum | State { DISCONNECTED, LOGON_IN_PROGRESS, LOGOUT_IN_PROGRESS, ACTIVE, RECONNECTING } |
| Session state. More... | |
| enum | EncryptionMethod { NONE, SSL } |
| enum | Role { NA, INITIATOR, ACCEPTOR } |
| Session role. More... | |
Public Member Functions | |
| Session (const std::string &senderCompID, const std::string &targetCompID, Version version, bool keepSequenceNumbersAfterLogout, FIXForge::FIX::ISessionListener *listener, SessionStorageType storageType=FileBasedStorage) | |
| Creates the FIX Session. | |
| Session (const std::string &senderCompID, const std::string &targetCompID, Version version, ISessionListener *listener, SessionStorageType storageType=FileBasedStorage) | |
| Creates the FIX Session. | |
| Session (const std::string &senderCompID, const std::string &targetCompID, const Dialect &dialect, bool keepSequenceNumbersAfterLogout, FIXForge::FIX::ISessionListener *listener, SessionStorageType storageType=FileBasedStorage) | |
| Creates the FIX Session. | |
| Session (const std::string &senderCompID, const std::string &targetCompID, const Dialect &dialect, ISessionListener *listener, SessionStorageType storageType=FileBasedStorage) | |
| Creates the FIX Session. | |
| ~Session () | |
| Destructor. | |
| State | getState () |
| Returns the session state. | |
| EncryptionMethod | getEncryptionMethod () const |
| Returns the current encryption method. | |
| void | setEncryptionMethod (EncryptionMethod newEncryptionMethod) |
| Sets the encryption method. | |
| void | setSslCertificateFile (const std::string &file) |
| Sets the SSL certificate file. | |
| void | setSslPrivateKeyFile (const std::string &file) |
| Sets the SSL private key file. | |
| void | logonAsAcceptor () |
| Establishes the FIX Connection as Acceptor. | |
| void | logonAsInitiator (const std::string &host, int port, bool setResetSeqNumFlag) |
| Establishes FIX Connection as Initiator using the ResetSeqNumFlag(141) field. | |
| void | logonAsInitiator (const std::string &host, int port) |
| Establishes FIX Connection as Initiator. | |
| void | logonAsInitiator (const std::string &host, int port, int heartBtInt) |
| Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds). | |
| void | logonAsInitiator (const std::string &host, int port, int heartBtInt, bool setResetSeqNumFlag) |
| Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds) and the ResetSeqNumFlag(141) field. | |
| void | logonAsInitiator (const std::string &host, int port, int heartBtInt, Message *customLogonMsg) |
| Establishes FIX Connection as Initiator using the custom Logon message. | |
| void | logonAsInitiator (const std::string &host, int port, int heartBtInt, Message *customLogonMsg, bool setResetSeqNumFlag) |
| Establishes FIX Connection as Initiator using the custom Logon message and the ResetSeqNumFlag(141) field. | |
| void | logout () |
| Terminates the FIX Connection. | |
| void | logout (const std::string &text) |
| Terminates the FIX Connection. | |
| void | send (Message *message) |
| Sends the message to the counterparty. | |
| void | shutdown () |
| Shutdowns the session. | |
| operator const std::string & () | |
| Returns the string descripton of the session. | |
| std::string | getCounterpartyHost () |
| Returns the counterparty host name. | |
| std::string | getCounterpartyIpAddress () |
| Returns the counterparty address. | |
| size_t | getCounterpartyPort () |
| Returns the counterparty port number. | |
| int | getHeartBtInt () |
| Returns the Heartbeat interval (seconds). | |
| int | getInSeqNum () |
| Returns the expected sequence number of the next incoming message. | |
| void | setInSeqNum (int seqNum) |
| Sets the expected sequence number of the next incoming message. | |
| int | getOutSeqNum () |
| Returns the sequence number of the next outgoing message. | |
| void | setOutSeqNum (int seqNum) |
| Sets the sequence number of the next outgoing message. | |
| Role | getRole () |
| Returns the session role. | |
| const std::string & | getSenderCompID () |
| Returns the assigned value used to identify firm sending message (the SenderCompID (tag=49) field value in outgoing messages). | |
| const std::string & | getTargetCompID () |
| Returns the Assigned value used to identify receiving firm (the TargetCompID (tag=56) field value in outgoing messages). | |
| Version | getVersion () |
| Returns the session FIX Protocol version. | |
| const Dialect & | dialect () |
| Instance of the FIX dialect or standard FIX messages dictionary which is used by the session. | |
| Message * | findSentMessage (int messageSequenceNumber) |
| Returns the sent message if it can be found by the given message sequence number, otherwise - NULL. | |
| void | registerListener (ISessionListener *listener) |
| Registers the Session listener. | |
| void | unregisterListener () |
| Un-registers the Session listener. | |
| void | reset () |
| Backups the current log files and resets the sequence numbers to 1. | |
| void | resetSeqNumViaLogonExchange () |
| Sends a Logon message with the ResetSeqNumFlag set. | |
| void | senderSubID (const std::string &value) |
| Sets the SenderSubID (tag=50) field values for all outgoing messages. | |
| void | targetSubID (const std::string &value) |
| Sets the TargetSubID (tag=57) field values for all outgoing messages. | |
| void | senderLocationID (const std::string &value) |
| Sets the SenderLocationID (tag=142) field values for all outgoing messages. | |
| void | targetLocationID (const std::string &value) |
| Sets the TargetLocationID (tag=143) field values for all outgoing messages. | |
| void | sendTestRequest (const std::string &testReqID="") |
| Sends the Test Request (MsgType=1) message. | |
Static Public Member Functions | |
| static const char * | state2string (State state) |
| Returns the session state as a string. | |
Friends | |
| struct | Engine::Impl |
Definition at line 39 of file Session.h.
| enum EncryptionMethod |
| enum SessionStorageType |
| enum State |
| Session | ( | const std::string & | senderCompID, | |
| const std::string & | targetCompID, | |||
| Version | version, | |||
| bool | keepSequenceNumbersAfterLogout, | |||
| FIXForge::FIX::ISessionListener * | listener, | |||
| SessionStorageType | storageType = FileBasedStorage | |||
| ) |
| senderCompID | Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages). | |
| targetCompID | Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages). | |
| version | Version of the FIX messaging specification (protocol) to be used by the session. | |
| keepSequenceNumbersAfterLogout | Option to keep sequence numbers after the exchange of Logout (MsgType=5) messages. | |
| listener | Instance of ISessionListener interface which will receive and handle miscellaneous Session events. | |
| storageType | Session storage type. |
| Session | ( | const std::string & | senderCompID, | |
| const std::string & | targetCompID, | |||
| Version | version, | |||
| ISessionListener * | listener, | |||
| SessionStorageType | storageType = FileBasedStorage | |||
| ) |
| senderCompID | Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages). | |
| targetCompID | Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages). | |
| version | Version of the FIX messaging specification (protocol) to be used by the session. | |
| listener | Instance of ISessionListener interface which will receive and handle miscellaneous Session events. | |
| storageType | Session storage type. |
| Session | ( | const std::string & | senderCompID, | |
| const std::string & | targetCompID, | |||
| const Dialect & | dialect, | |||
| bool | keepSequenceNumbersAfterLogout, | |||
| FIXForge::FIX::ISessionListener * | listener, | |||
| SessionStorageType | storageType = FileBasedStorage | |||
| ) |
| senderCompID | Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages). | |
| targetCompID | Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages). | |
| dialect | FIX dialect to be used by the session. | |
| keepSequenceNumbersAfterLogout | Option to keep sequence numbers after the exchange of Logout (MsgType=5) messages. | |
| listener | Instance of ISessionListener interface which will receive and handle miscellaneous Session events. | |
| storageType | Session storage type. |
| Session | ( | const std::string & | senderCompID, | |
| const std::string & | targetCompID, | |||
| const Dialect & | dialect, | |||
| ISessionListener * | listener, | |||
| SessionStorageType | storageType = FileBasedStorage | |||
| ) |
| senderCompID | Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages). | |
| targetCompID | Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages). | |
| dialect | FIX dialect to be used by the session. | |
| listener | Instance of ISessionListener interface which will receive and handle miscellaneous Session events. | |
| storageType | Session storage type. |
| ~Session | ( | ) |
Destructor.
| const Dialect& dialect | ( | ) |
| Message* findSentMessage | ( | int | messageSequenceNumber | ) |
Returns the sent message if it can be found by the given message sequence number, otherwise - NULL.
| std::string getCounterpartyHost | ( | ) |
Returns the counterparty host name.
| std::string getCounterpartyIpAddress | ( | ) |
Returns the counterparty address.
| size_t getCounterpartyPort | ( | ) |
Returns the counterparty port number.
| EncryptionMethod getEncryptionMethod | ( | ) | const |
Returns the current encryption method.
| int getHeartBtInt | ( | ) |
Returns the Heartbeat interval (seconds).
| int getInSeqNum | ( | ) |
Returns the expected sequence number of the next incoming message.
| int getOutSeqNum | ( | ) |
Returns the sequence number of the next outgoing message.
| Role getRole | ( | ) |
Returns the session role.
| const std::string& getSenderCompID | ( | ) |
Returns the assigned value used to identify firm sending message (the SenderCompID (tag=49) field value in outgoing messages).
| State getState | ( | ) |
Returns the session state.
| const std::string& getTargetCompID | ( | ) |
Returns the Assigned value used to identify receiving firm (the TargetCompID (tag=56) field value in outgoing messages).
| Version getVersion | ( | ) |
Returns the session FIX Protocol version.
| void logonAsAcceptor | ( | ) |
Establishes the FIX Connection as Acceptor.
Acceptor is the receiving party of the FIX session. It listens for the incoming connection on the pre-defined port. The acceptor has responsibility to perform first level authentication and formally declare the connection request "accepted" through transmission of an acknowledgment Logon message.
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port, | |||
| int | heartBtInt, | |||
| Message * | customLogonMsg, | |||
| bool | setResetSeqNumFlag | |||
| ) |
Establishes FIX Connection as Initiator using the custom Logon message and the ResetSeqNumFlag(141) field.
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port, | |||
| int | heartBtInt, | |||
| Message * | customLogonMsg | |||
| ) |
Establishes FIX Connection as Initiator using the custom Logon message.
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port, | |||
| int | heartBtInt, | |||
| bool | setResetSeqNumFlag | |||
| ) |
Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds) and the ResetSeqNumFlag(141) field.
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port, | |||
| int | heartBtInt | |||
| ) |
Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds).
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port | |||
| ) |
Establishes FIX Connection as Initiator.
Initiator establishes the telecommunications link and initiates the session via transmission of the initial Logon message.
| void logonAsInitiator | ( | const std::string & | host, | |
| int | port, | |||
| bool | setResetSeqNumFlag | |||
| ) |
Establishes FIX Connection as Initiator using the ResetSeqNumFlag(141) field.
Initiator establishes the telecommunications link and initiates the session via transmission of the initial Logon message.
| void logout | ( | const std::string & | text | ) |
Terminates the FIX Connection.
| text | Free format text string that is sent to the counterparty in the Text(58) field of the initial Logout message. |
| void logout | ( | ) |
Terminates the FIX Connection.
The initial Logout message is sent to the conterparty and the method blocks until the acknowledgement Logout message is received.
| operator const std::string & | ( | ) |
Returns the string descripton of the session.
| void registerListener | ( | ISessionListener * | listener | ) |
| void reset | ( | ) |
Backups the current log files and resets the sequence numbers to 1.
| void resetSeqNumViaLogonExchange | ( | ) |
Sends a Logon message with the ResetSeqNumFlag set.
| void send | ( | Message * | message | ) |
Sends the message to the counterparty.
As soon as a session is created it is possible to start sending messages via the session. If the session is not established, the messages will be sent when the connection is established with the counterparty.
| void senderLocationID | ( | const std::string & | value | ) |
Sets the SenderLocationID (tag=142) field values for all outgoing messages.
| void senderSubID | ( | const std::string & | value | ) |
Sets the SenderSubID (tag=50) field values for all outgoing messages.
| void sendTestRequest | ( | const std::string & | testReqID = "" |
) |
Sends the Test Request (MsgType=1) message.
| void setEncryptionMethod | ( | EncryptionMethod | newEncryptionMethod | ) |
Sets the encryption method.
| void setInSeqNum | ( | int | seqNum | ) |
Sets the expected sequence number of the next incoming message.
| void setOutSeqNum | ( | int | seqNum | ) |
Sets the sequence number of the next outgoing message.
| void setSslCertificateFile | ( | const std::string & | file | ) |
Sets the SSL certificate file.
| void setSslPrivateKeyFile | ( | const std::string & | file | ) |
Sets the SSL private key file.
| void shutdown | ( | ) |
Shutdowns the session.
| static const char* state2string | ( | State | state | ) | [static] |
Returns the session state as a string.
| void targetLocationID | ( | const std::string & | value | ) |
Sets the TargetLocationID (tag=143) field values for all outgoing messages.
| void targetSubID | ( | const std::string & | value | ) |
Sets the TargetSubID (tag=57) field values for all outgoing messages.
| void unregisterListener | ( | ) |
Un-registers the Session listener.
1.5.9