C# Class QuickFix.Session

The Session is the primary FIX abstraction for message communication. It performs sequencing and error recovery and represents a communication channel to a counterparty. Sessions are independent of specific communication layer connections. A Session is defined as starting with message sequence number of 1 and ending when the session is reset. The Session could span many sequential connections (it cannot operate on multiple connections simultaneously).
Inheritance: IDisposable
Mostra file Open project: kennystone/quickfixn Class Usage Examples

Public Methods

Method Description
Disconnect ( string reason ) : void
GenerateHeartbeat ( ) : bool
GenerateHeartbeat ( Message testRequest ) : bool
GenerateLogout ( ) : bool
GenerateLogout ( string text ) : bool
GenerateReject ( Message message, FixValues reason ) : bool
GenerateReject ( Message message, FixValues reason, int field ) : bool
GenerateTestRequest ( string id ) : bool
Logon ( ) : void
Logout ( ) : void
Logout ( string reason ) : void
LookupSession ( SessionID sessionID ) : Session

Looks up a Session by its SessionID

Next ( ) : void
Next ( Message message ) : void
Next ( string msgStr ) : void
Refresh ( ) : void
Reset ( ) : void
Send ( Message message ) : bool
Send ( string message ) : bool
SendToTarget ( Message message ) : bool

Send to session indicated by header fields in message

SendToTarget ( Message message, SessionID sessionID ) : bool

FIXME send Message, not string

Session ( Application app, MessageStoreFactory storeFactory, SessionID sessID, QuickFix.DataDictionaryProvider dataDictProvider, SessionSchedule sessionSchedule, int heartBtInt, LogFactory logFactory, IMessageFactory msgFactory ) : System.Collections.Generic
SetResponder ( Responder responder ) : void
Verify ( Message message ) : bool
Verify ( Message msg, bool checkTooHigh, bool checkTooLow ) : bool

Protected Methods

Method Description
CheckSessionTime ( ) : bool
DoPossDup ( Message msg ) : bool
DoTargetTooHigh ( Message msg, int msgSeqNum ) : void
DoTargetTooLow ( Message msg, int msgSeqNum ) : bool
GenerateBusinessMessageReject ( Message message, int err, int field ) : void
GenerateLogon ( ) : bool

FIXME

GenerateLogon ( int heartBtInt ) : bool

FIXME don't do so much operator new here

GenerateResendRequest ( string beginString, int msgSeqNum ) : bool
InitializeHeader ( Message m ) : void
InitializeHeader ( Message m, int msgSeqNum ) : void

FIXME don't do so much operator new here

InsertOrigSendingTime ( FieldMap header, System sendingTime ) : void
InsertSendingTime ( FieldMap header ) : void
IsCorrectCompID ( string senderCompID, string targetCompID ) : bool
IsGoodTime ( Message msg ) : bool
IsTargetTooHigh ( int msgSeqNum ) : bool
IsTargetTooLow ( int msgSeqNum ) : bool
IsTimeToGenerateLogon ( ) : bool
NextHeartbeat ( Message heartbeat ) : void
NextLogon ( Message logon ) : void
NextLogout ( Message logout ) : void
NextQueued ( int num ) : bool
NextQueued ( ) : void
NextResendRequest ( Message resendReq ) : void
NextSequenceReset ( Message sequenceReset ) : void
NextTestRequest ( Message testRequest ) : void
Persist ( Message message, string messageString ) : void
PopulateRejectReason ( Message reject, string text ) : void
PopulateSessionRejectReason ( Message reject, int field, string text, bool includeFieldInfo ) : void
SendRaw ( Message message, int seqNum ) : bool
ShouldSendReset ( ) : bool

Private Methods

Method Description
GenerateSequenceReset ( int beginSeqNo, int endSeqNo ) : void
IsAdminMessage ( Message msg ) : bool
initializeResendFields ( Message message ) : void

Method Details

CheckSessionTime() protected method

protected CheckSessionTime ( ) : bool
return bool

Disconnect() public method

public Disconnect ( string reason ) : void
reason string
return void

DoPossDup() protected method

protected DoPossDup ( Message msg ) : bool
msg Message
return bool

DoTargetTooHigh() protected method

protected DoTargetTooHigh ( Message msg, int msgSeqNum ) : void
msg Message
msgSeqNum int
return void

DoTargetTooLow() protected method

protected DoTargetTooLow ( Message msg, int msgSeqNum ) : bool
msg Message
msgSeqNum int
return bool

GenerateBusinessMessageReject() protected method

protected GenerateBusinessMessageReject ( Message message, int err, int field ) : void
message Message
err int
field int
return void

GenerateHeartbeat() public method

public GenerateHeartbeat ( ) : bool
return bool

GenerateHeartbeat() public method

public GenerateHeartbeat ( Message testRequest ) : bool
testRequest Message
return bool

GenerateLogon() protected method

FIXME
protected GenerateLogon ( ) : bool
return bool

GenerateLogon() protected method

FIXME don't do so much operator new here
protected GenerateLogon ( int heartBtInt ) : bool
heartBtInt int
return bool

GenerateLogout() public method

public GenerateLogout ( ) : bool
return bool

GenerateLogout() public method

public GenerateLogout ( string text ) : bool
text string
return bool

GenerateReject() public method

public GenerateReject ( Message message, FixValues reason ) : bool
message Message
reason FixValues
return bool

GenerateReject() public method

public GenerateReject ( Message message, FixValues reason, int field ) : bool
message Message
reason FixValues
field int
return bool

GenerateResendRequest() protected method

protected GenerateResendRequest ( string beginString, int msgSeqNum ) : bool
beginString string
msgSeqNum int
return bool

GenerateTestRequest() public method

public GenerateTestRequest ( string id ) : bool
id string
return bool

InitializeHeader() protected method

protected InitializeHeader ( Message m ) : void
m Message
return void

InitializeHeader() protected method

FIXME don't do so much operator new here
protected InitializeHeader ( Message m, int msgSeqNum ) : void
m Message
msgSeqNum int
return void

InsertOrigSendingTime() protected method

protected InsertOrigSendingTime ( FieldMap header, System sendingTime ) : void
header FieldMap
sendingTime System
return void

InsertSendingTime() protected method

protected InsertSendingTime ( FieldMap header ) : void
header FieldMap
return void

IsCorrectCompID() protected method

protected IsCorrectCompID ( string senderCompID, string targetCompID ) : bool
senderCompID string
targetCompID string
return bool

IsGoodTime() protected method

protected IsGoodTime ( Message msg ) : bool
msg Message
return bool

IsTargetTooHigh() protected method

protected IsTargetTooHigh ( int msgSeqNum ) : bool
msgSeqNum int
return bool

IsTargetTooLow() protected method

protected IsTargetTooLow ( int msgSeqNum ) : bool
msgSeqNum int
return bool

IsTimeToGenerateLogon() protected method

protected IsTimeToGenerateLogon ( ) : bool
return bool

Logon() public method

public Logon ( ) : void
return void

Logout() public method

public Logout ( ) : void
return void

Logout() public method

public Logout ( string reason ) : void
reason string
return void

LookupSession() public static method

Looks up a Session by its SessionID
public static LookupSession ( SessionID sessionID ) : Session
sessionID SessionID the SessionID of the Session
return Session

Next() public method

public Next ( ) : void
return void

Next() public method

public Next ( Message message ) : void
message Message
return void

Next() public method

public Next ( string msgStr ) : void
msgStr string
return void

NextHeartbeat() protected method

protected NextHeartbeat ( Message heartbeat ) : void
heartbeat Message
return void

NextLogon() protected method

protected NextLogon ( Message logon ) : void
logon Message
return void

NextLogout() protected method

protected NextLogout ( Message logout ) : void
logout Message
return void

NextQueued() protected method

protected NextQueued ( int num ) : bool
num int
return bool

NextQueued() protected method

protected NextQueued ( ) : void
return void

NextResendRequest() protected method

protected NextResendRequest ( Message resendReq ) : void
resendReq Message
return void

NextSequenceReset() protected method

protected NextSequenceReset ( Message sequenceReset ) : void
sequenceReset Message
return void

NextTestRequest() protected method

protected NextTestRequest ( Message testRequest ) : void
testRequest Message
return void

Persist() protected method

protected Persist ( Message message, string messageString ) : void
message Message
messageString string
return void

PopulateRejectReason() protected method

protected PopulateRejectReason ( Message reject, string text ) : void
reject Message
text string
return void

PopulateSessionRejectReason() protected method

protected PopulateSessionRejectReason ( Message reject, int field, string text, bool includeFieldInfo ) : void
reject Message
field int
text string
includeFieldInfo bool
return void

Refresh() public method

public Refresh ( ) : void
return void

Reset() public method

public Reset ( ) : void
return void

Send() public method

public Send ( Message message ) : bool
message Message
return bool

Send() public method

public Send ( string message ) : bool
message string
return bool

SendRaw() protected method

protected SendRaw ( Message message, int seqNum ) : bool
message Message
seqNum int
return bool

SendToTarget() public static method

Send to session indicated by header fields in message
public static SendToTarget ( Message message ) : bool
message Message
return bool

SendToTarget() public static method

FIXME send Message, not string
public static SendToTarget ( Message message, SessionID sessionID ) : bool
message Message
sessionID SessionID
return bool

Session() public method

public Session ( Application app, MessageStoreFactory storeFactory, SessionID sessID, QuickFix.DataDictionaryProvider dataDictProvider, SessionSchedule sessionSchedule, int heartBtInt, LogFactory logFactory, IMessageFactory msgFactory ) : System.Collections.Generic
app Application
storeFactory MessageStoreFactory
sessID SessionID
dataDictProvider QuickFix.DataDictionaryProvider
sessionSchedule SessionSchedule
heartBtInt int
logFactory LogFactory
msgFactory IMessageFactory
return System.Collections.Generic

SetResponder() public method

public SetResponder ( Responder responder ) : void
responder Responder
return void

ShouldSendReset() protected method

protected ShouldSendReset ( ) : bool
return bool

Verify() public method

public Verify ( Message message ) : bool
message Message
return bool

Verify() public method

public Verify ( Message msg, bool checkTooHigh, bool checkTooLow ) : bool
msg Message
checkTooHigh bool
checkTooLow bool
return bool