Class SessionParameters
This bean contains all session level configuration for current session.
It is possible to confiniently define a list of custom FIX fields that will be added to each message.
For more complex message customization take a look at AbstractFixSessionFactory
Inheritance
System.Object
SessionParameters
Implements
System.ICloneable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: FixAntenna.Core.dll
Syntax
public class SessionParameters : ICloneable
Constructors
SessionParameters()
Declaration
public SessionParameters()
SessionParameters(Config)
Declaration
public SessionParameters(Config config)
Parameters
Type |
Name |
Description |
Config |
config |
|
Fields
AppVersionContainer
Declaration
protected FixVersionContainer AppVersionContainer
Field Value
DefaultSequenceNum
Declaration
public const int DefaultSequenceNum = 0
Field Value
Type |
Description |
System.Int32 |
|
Destinations
Declaration
protected IList<DnsEndPoint> Destinations
Field Value
Type |
Description |
System.Collections.Generic.IList<System.Net.DnsEndPoint> |
|
FixMessage
Declaration
protected FixMessage FixMessage
Field Value
FixVersionContainer
Declaration
protected FixVersionContainer FixVersionContainer
Field Value
HeartbeatInterval
Declaration
protected int HeartbeatInterval
Field Value
Type |
Description |
System.Int32 |
|
Host
Declaration
Field Value
Type |
Description |
System.String |
|
IncomingLoginFixMessage
Declaration
protected FixMessage IncomingLoginFixMessage
Field Value
IncomingSequenceNumber
Declaration
protected long IncomingSequenceNumber
Field Value
Type |
Description |
System.Int64 |
|
LastSeqNumResetTimestamp
Declaration
protected long LastSeqNumResetTimestamp
Field Value
Type |
Description |
System.Int64 |
|
OutgoingLoginFixMessage
Declaration
protected FixMessage OutgoingLoginFixMessage
Field Value
OutgoingSequenceNumber
Declaration
protected long OutgoingSequenceNumber
Field Value
Type |
Description |
System.Int64 |
|
Port
Declaration
Field Value
Type |
Description |
System.Nullable<System.Int32> |
|
SenderLocationId
Declaration
protected string SenderLocationId
Field Value
Type |
Description |
System.String |
|
SenderSubId
Declaration
protected string SenderSubId
Field Value
Type |
Description |
System.String |
|
TargetLocationId
Declaration
protected string TargetLocationId
Field Value
Type |
Description |
System.String |
|
TargetSubId
Declaration
protected string TargetSubId
Field Value
Type |
Description |
System.String |
|
Properties
SessionId
Declaration
public SessionId SessionId { get; set; }
Property Value
Methods
AddAllDestinations(ICollection<DnsEndPoint>)
Add alternative(backup) destinations for initiator.
Declaration
public virtual void AddAllDestinations(ICollection<DnsEndPoint> destinations)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<System.Net.DnsEndPoint> |
destinations |
backup addresses
|
AddDestination(DnsEndPoint)
Add alternative(backup) destination for initiator.
Declaration
public virtual void AddDestination(DnsEndPoint destination)
Parameters
Type |
Name |
Description |
System.Net.DnsEndPoint |
destination |
backup address
|
AddDestination(String, Int32)
Add alternative(backup) destination for initiator.
Declaration
public virtual void AddDestination(string host, int port)
Parameters
Type |
Name |
Description |
System.String |
host |
backup host
|
System.Int32 |
port |
backup port
|
Declaration
public virtual void AddHeaderField(int tag, byte[] value)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.Byte[] |
value |
|
AddOutgoingLoginField(Int32, Byte[])
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, byte[] value)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.Byte[] |
value |
|
AddOutgoingLoginField(Int32, Byte[], Int32, Int32)
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.Byte[] |
value |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, DateTimeOffset value, FixDateFormatterFactory.FixDateType type)
Parameters
AddOutgoingLoginField(Int32, Double, Int32)
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, double value, int precision)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.Double |
value |
|
System.Int32 |
precision |
|
AddOutgoingLoginField(Int32, Int64)
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, long value)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.Int64 |
value |
|
AddOutgoingLoginField(Int32, String)
Add field to outgoing login fields list.
Declaration
public virtual void AddOutgoingLoginField(int tag, string value)
Parameters
Type |
Name |
Description |
System.Int32 |
tag |
|
System.String |
value |
|
Clone()
Creates and returns a copy of this object.
Declaration
Returns
Type |
Description |
System.Object |
SessionParameters
|
CreateAcceptorSession()
Creates acceptor session in disconnected state
Declaration
public virtual IFixSession CreateAcceptorSession()
Returns
CreateInitiatorSession()
Creates initiator session
Declaration
public virtual IFixSession CreateInitiatorSession()
Returns
CreateNewFixSession()
Creates initiator fix session.
User can use
StandardFixSessionFactory.GetFactory(SessionParameters).CreateInitiatorSession(SessionParameters)
instead this method.
Declaration
public virtual IFixSession CreateNewFixSession()
Returns
See Also
DisableInSeqNumsOnNextConnect()
Declaration
public virtual void DisableInSeqNumsOnNextConnect()
DisableOutSeqNumsOnNextConnect()
Declaration
public virtual void DisableOutSeqNumsOnNextConnect()
Equals(Object)
Declaration
public override bool Equals(object o)
Parameters
Type |
Name |
Description |
System.Object |
o |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
FromProperties(IDictionary<String, String>)
Creates the SessionParameters from properties.
The engine calls this method when the stored parameters should be de-serialized from properties.
Declaration
public virtual void FromProperties(IDictionary<string, string> properties)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
properties |
the properties
|
GetAppVersion()
Declaration
public virtual FixVersion GetAppVersion()
Returns
GetAppVersionContainer()
Declaration
public virtual FixVersionContainer GetAppVersionContainer()
Returns
GetConfiguration()
Declaration
public virtual Config GetConfiguration()
Returns
GetCustomLoader()
The loader is used for loading configurable classes.
Declaration
public virtual Func<string, object> GetCustomLoader()
Returns
Type |
Description |
System.Func<System.String, System.Object> |
|
GetDestinations()
Gets alternative(backup) destinations for initiator.
Declaration
public virtual IList<DnsEndPoint> GetDestinations()
Returns
Type |
Description |
System.Collections.Generic.IList<System.Net.DnsEndPoint> |
list of alternative destinations.
|
GetEncryptionType()
Declaration
public virtual EncryptionType GetEncryptionType()
Returns
GetFixMessage()
Gets user defined fields.
If this list is not empty, Engine add it to each outgoing message.
Declaration
public virtual FixMessage GetFixMessage()
Returns
GetFixVersion()
Declaration
public virtual FixVersion GetFixVersion()
Returns
GetFixVersionContainer()
Declaration
public virtual FixVersionContainer GetFixVersionContainer()
Returns
GetForceSeqNumReset()
Gets force sequence reset.
Declaration
public virtual ForceSeqNumReset GetForceSeqNumReset()
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
GetHeartbeatInterval()
Declaration
public virtual int GetHeartbeatInterval()
Returns
Type |
Description |
System.Int32 |
|
GetHost()
Declaration
public virtual string GetHost()
Returns
Type |
Description |
System.String |
|
GetIncomingLoginFixMessage()
Gets incoming login fields.
Declaration
public virtual FixMessage GetIncomingLoginFixMessage()
Returns
Type |
Description |
FixMessage |
FixMessage list of field
|
GetIncomingPassword()
Declaration
public virtual string GetIncomingPassword()
Returns
Type |
Description |
System.String |
|
GetIncomingSequenceNumber()
Declaration
public virtual long GetIncomingSequenceNumber()
Returns
Type |
Description |
System.Int64 |
|
GetIncomingUserName()
Declaration
public virtual string GetIncomingUserName()
Returns
Type |
Description |
System.String |
|
GetLastSeqNumResetTimestamp()
Gets last seq num reset timestamp.
Declaration
public virtual long GetLastSeqNumResetTimestamp()
Returns
Type |
Description |
System.Int64 |
|
GetOutgoingLoginFixMessage()
Gets outgoing login fields.
This parameter used only for initiator session,
Engine added outgoingLoginFixMessage to login message.
Declaration
public virtual FixMessage GetOutgoingLoginFixMessage()
Returns
GetOutgoingSequenceNumber()
Declaration
public virtual long GetOutgoingSequenceNumber()
Returns
Type |
Description |
System.Int64 |
|
GetPassword()
Declaration
public virtual string GetPassword()
Returns
Type |
Description |
System.String |
|
GetPort()
Declaration
public virtual int GetPort()
Returns
Type |
Description |
System.Int32 |
|
GetSenderCompId()
Declaration
public virtual string GetSenderCompId()
Returns
Type |
Description |
System.String |
|
GetSenderLocationId()
Declaration
public virtual string GetSenderLocationId()
Returns
Type |
Description |
System.String |
|
GetSenderSubId()
Declaration
public virtual string GetSenderSubId()
Returns
Type |
Description |
System.String |
|
GetSessionQualifier()
Declaration
public virtual string GetSessionQualifier()
Returns
Type |
Description |
System.String |
|
GetTargetCompId()
Declaration
public virtual string GetTargetCompId()
Returns
Type |
Description |
System.String |
|
GetTargetLocationId()
Declaration
public virtual string GetTargetLocationId()
Returns
Type |
Description |
System.String |
|
GetTargetSubId()
Declaration
public virtual string GetTargetSubId()
Returns
Type |
Description |
System.String |
|
GetUserName()
Declaration
public virtual string GetUserName()
Returns
Type |
Description |
System.String |
|
HasPort()
Declaration
public virtual bool HasPort()
Returns
Type |
Description |
System.Boolean |
|
IsCustomSessionId()
Declaration
public virtual bool IsCustomSessionId()
Returns
Type |
Description |
System.Boolean |
|
IsNeedToIncludeLastProcessed()
Declaration
public virtual bool IsNeedToIncludeLastProcessed()
Returns
Type |
Description |
System.Boolean |
|
IsSetInSeqNumsOnNextConnect()
Declaration
public virtual bool IsSetInSeqNumsOnNextConnect()
Returns
Type |
Description |
System.Boolean |
|
IsSetOutSeqNumsOnNextConnect()
Declaration
public virtual bool IsSetOutSeqNumsOnNextConnect()
Returns
Type |
Description |
System.Boolean |
|
IsSetSeqNumsOnNextConnect()
Declaration
public virtual bool IsSetSeqNumsOnNextConnect()
Returns
Type |
Description |
System.Boolean |
|
IsSimilar(SessionParameters)
Return true if parameter object describe the same FIX session.
Declaration
public virtual bool IsSimilar(SessionParameters other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsSimilar(SessionParameters, IList<String>)
Return true if parameter object describe the same FIX session.
Declaration
public virtual bool IsSimilar(SessionParameters other, IList<string> errors)
Parameters
Type |
Name |
Description |
SessionParameters |
other |
|
System.Collections.Generic.IList<System.String> |
errors |
|
Returns
Type |
Description |
System.Boolean |
|
PrintConfiguration()
Declaration
public virtual void PrintConfiguration()
RemoveAllDestinations(ICollection<DnsEndPoint>)
Remove alternative(backup) destinations from connections list.
Declaration
public virtual void RemoveAllDestinations(ICollection<DnsEndPoint> destinations)
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<System.Net.DnsEndPoint> |
destinations |
backup addresses
|
RemoveDestination(DnsEndPoint)
Remove alternative(backup) destination from connections list.
Declaration
public virtual void RemoveDestination(DnsEndPoint destination)
Parameters
Type |
Name |
Description |
System.Net.DnsEndPoint |
destination |
backup address
|
RemoveDestination(String, Int32)
Remove alternative(backup) destination from connections list.
Declaration
public virtual void RemoveDestination(string host, int port)
Parameters
Type |
Name |
Description |
System.String |
host |
backup host
|
System.Int32 |
port |
backup port
|
SetAppVersion(FixVersion)
Declaration
public virtual void SetAppVersion(FixVersion appVersion)
Parameters
Type |
Name |
Description |
FixVersion |
appVersion |
the app version
|
SetAppVersion(FixVersionContainer)
Declaration
public virtual void SetAppVersion(FixVersionContainer appVersionContainer)
Parameters
SetConfiguration(Config)
Setter for Configuration.
Declaration
public virtual void SetConfiguration(Config configuration)
Parameters
Type |
Name |
Description |
Config |
configuration |
the configuration
|
SetCustomLoader(Func<String, Object>)
The loader is used for loading configurable classes.
Declaration
public virtual void SetCustomLoader(Func<string, object> handlersLoader)
Parameters
Type |
Name |
Description |
System.Func<System.String, System.Object> |
handlersLoader |
|
SetDestinationsIfPresent(IDictionary<String, String>)
Declaration
public virtual void SetDestinationsIfPresent(IDictionary<string, string> properties)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.String> |
properties |
|
SetEncryptionType(EncryptionType)
Declaration
public virtual void SetEncryptionType(EncryptionType encryptionType)
Parameters
Type |
Name |
Description |
EncryptionType |
encryptionType |
the encryption type
|
SetFixMessage(FixMessage)
Sets user defined fields.
If this list is not empty, Engine add it to each outgoing message.
Declaration
public virtual void SetFixMessage(FixMessage fixMessage)
Parameters
Type |
Name |
Description |
FixMessage |
fixMessage |
the user defined fields
|
SetFixVersion(FixVersion)
Sets fix version.
if fix version is above FIX.5.0 the app version should be FIXT.1.1
Declaration
public virtual void SetFixVersion(FixVersion fixVersion)
Parameters
Type |
Name |
Description |
FixVersion |
fixVersion |
the fix version
|
SetFixVersion(FixVersionContainer)
Declaration
public virtual void SetFixVersion(FixVersionContainer fixVersionContainer)
Parameters
SetForceSeqNumReset(ForceSeqNumReset)
Sets force sequence reset.
Declaration
public virtual void SetForceSeqNumReset(ForceSeqNumReset forceSeqNumReset)
Parameters
SetHeartbeatInterval(Int32)
Declaration
public virtual void SetHeartbeatInterval(int heartbeatInterval)
Parameters
Type |
Name |
Description |
System.Int32 |
heartbeatInterval |
the HBI, default value is 30.
|
SetHost(String)
Declaration
public virtual void SetHost(string host)
Parameters
Type |
Name |
Description |
System.String |
host |
the host
|
SetIncomingLoginFixMessage(FixMessage)
Sets incoming login fields.
Engine used incomingLoginFixMessage only for acceptor session.
Declaration
public virtual void SetIncomingLoginFixMessage(FixMessage incomingLoginFixMessage)
Parameters
Type |
Name |
Description |
FixMessage |
incomingLoginFixMessage |
|
SetIncomingSequenceNumber(Int64)
Declaration
public virtual void SetIncomingSequenceNumber(long incomingSequenceNumber)
Parameters
Type |
Name |
Description |
System.Int64 |
incomingSequenceNumber |
|
SetLastSeqNumResetTimestamp(Int64)
Sets last seq num reset timestamp.
Declaration
public virtual void SetLastSeqNumResetTimestamp(long lastSeqNumResetTimestamp)
Parameters
Type |
Name |
Description |
System.Int64 |
lastSeqNumResetTimestamp |
the timestamp
|
SetOutgoingLoginFixMessage(FixMessage)
Sets outgoing login fields.
Declaration
public virtual void SetOutgoingLoginFixMessage(FixMessage outgoingLoginFixMessage)
Parameters
Type |
Name |
Description |
FixMessage |
outgoingLoginFixMessage |
|
SetOutgoingSequenceNumber(Int64)
Declaration
public virtual void SetOutgoingSequenceNumber(long outgoingSequenceNumber)
Parameters
Type |
Name |
Description |
System.Int64 |
outgoingSequenceNumber |
|
SetPassword(String)
Declaration
public virtual void SetPassword(string password)
Parameters
Type |
Name |
Description |
System.String |
password |
|
SetPort(Nullable<Int32>)
Declaration
public virtual void SetPort(int? port)
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
port |
the port
|
SetSenderCompId(String)
Declaration
public virtual void SetSenderCompId(string senderCompId)
Parameters
Type |
Name |
Description |
System.String |
senderCompId |
the sender comp id
|
SetSenderLocationId(String)
Declaration
public virtual void SetSenderLocationId(string senderLocationId)
Parameters
Type |
Name |
Description |
System.String |
senderLocationId |
the sender location id
|
SetSenderSubId(String)
Declaration
public virtual void SetSenderSubId(string senderSubId)
Parameters
Type |
Name |
Description |
System.String |
senderSubId |
the sender sub id
|
SetSessionId(String)
Change session identifier
Declaration
public virtual void SetSessionId(string sessionId)
Parameters
Type |
Name |
Description |
System.String |
sessionId |
unique string value. maximum 200 characters length. Allowed characters: a-z, A-Z, 0-9, '.',
'-', '_', ' '(space) and '!'
|
SetSessionQualifier(String)
Declaration
public virtual void SetSessionQualifier(string qualifier)
Parameters
Type |
Name |
Description |
System.String |
qualifier |
|
SetTargetCompId(String)
Declaration
public virtual void SetTargetCompId(string targetCompId)
Parameters
Type |
Name |
Description |
System.String |
targetCompId |
the target comp id
|
SetTargetLocationId(String)
Declaration
public virtual void SetTargetLocationId(string targetLocationId)
Parameters
Type |
Name |
Description |
System.String |
targetLocationId |
the target location id
|
SetTargetSubId(String)
Declaration
public virtual void SetTargetSubId(string targetSubId)
Parameters
Type |
Name |
Description |
System.String |
targetSubId |
the target sub id
|
SetUserName(String)
Declaration
public virtual void SetUserName(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
ToProperties()
Creates and returns a copy of this object.
The engine calls this method when the specific parameters should be serialized to properties.
Declaration
public virtual Dictionary<string, string> ToProperties()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.String> |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
System.ICloneable
See Also