Class FixSessionManager
This singleton contains all registered FIXSessions in this JVM session. Each class in the list backed up by the WeakReference so it may return bogus values for sessions that just expired and were removed from the list because of that. SessionState will be returned as DEAD.
Inheritance
Inherited Members
Namespace: FixAntenna.FixEngine.Manager
Assembly: FixAntenna.Core.dll
Syntax
public class FixSessionManager
Properties
WaitTime
Gets or sets wait time.
Declaration
public int WaitTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AddTask(ISessionManagerTask)
Adds a new session manager task.
Declaration
public void AddTask(ISessionManagerTask task)
Parameters
Type | Name | Description |
---|---|---|
ISessionManagerTask | task | the task to add |
CancelScheduleTask(SchedulerTask)
Remove scheduled task.
Declaration
public void CancelScheduleTask(SchedulerTask schedulerTask)
Parameters
Type | Name | Description |
---|---|---|
SchedulerTask | schedulerTask |
CloseAllSession()
Methods close all sessions.
Declaration
public static void CloseAllSession()
Decode(SByte[])
Declaration
protected static string Decode(sbyte[] cipher)
Parameters
Type | Name | Description |
---|---|---|
System.SByte[] | cipher |
Returns
Type | Description |
---|---|
System.String |
DisposeAllSession()
Methods dispose all sessions.
Declaration
public static void DisposeAllSession()
Exists(String)
Returns true if session with senderCompID and targetCompID exists.
Declaration
public bool Exists(string sessionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | sessionId | the unique session identifier |
Returns
Type | Description |
---|---|
System.Boolean |
GetCopyList(IList<IExtendedFixSession>)
Declaration
public void GetCopyList(IList<IExtendedFixSession> copyTo)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<IExtendedFixSession> | copyTo |
GetFixSessionManager()
Gets the FixSessionManager instance.
Declaration
public static FixSessionManager GetFixSessionManager()
Returns
Type | Description |
---|---|
FixSessionManager |
GetList()
Gets the session list.
Declaration
public IList<IExtendedFixSession> GetList()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<IExtendedFixSession> | cloned list of session |
GetSessionSize()
Declaration
public int GetSessionSize()
Returns
Type | Description |
---|---|
System.Int32 |
Locate(SessionId)
Finds the session by sessionID.
Declaration
public IExtendedFixSession Locate(SessionId sessionId)
Parameters
Type | Name | Description |
---|---|---|
SessionId | sessionId | the unique session identifier |
Returns
Type | Description |
---|---|
IExtendedFixSession |
Locate(SessionParameters)
Declaration
public IExtendedFixSession Locate(SessionParameters params)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | params |
Returns
Type | Description |
---|---|
IExtendedFixSession |
Locate(String)
Finds the session by sessionID.
Declaration
public IExtendedFixSession Locate(string sessionId)
Parameters
Type | Name | Description |
---|---|---|
System.String | sessionId | the unique session identifier |
Returns
Type | Description |
---|---|
IExtendedFixSession |
Locate(String, String, String, String, String, String)
TODO: implement ASAP
Declaration
public IExtendedFixSession Locate(string senderComId, string senderSubId, string senderLocationId, string targetCompId, string targetSubId, string targetLocationId)
Parameters
Type | Name | Description |
---|---|---|
System.String | senderComId | |
System.String | senderSubId | |
System.String | senderLocationId | |
System.String | targetCompId | |
System.String | targetSubId | |
System.String | targetLocationId | @return |
Returns
Type | Description |
---|---|
IExtendedFixSession |
LocateFirst(String, String)
Finds the session with senderCompID and targetCompID. It's possible that can be several such sessions but method will return randomly first.
Declaration
public IExtendedFixSession LocateFirst(string senderCompId, string targetCompId)
Parameters
Type | Name | Description |
---|---|---|
System.String | senderCompId | the sender comp id |
System.String | targetCompId | the target comp id |
Returns
Type | Description |
---|---|
IExtendedFixSession |
NotifySessionAdd(IExtendedFixSession)
Declaration
public void NotifySessionAdd(IExtendedFixSession fixSession)
Parameters
Type | Name | Description |
---|---|---|
IExtendedFixSession | fixSession |
NotifySessionRemoved(IExtendedFixSession)
Declaration
public void NotifySessionRemoved(IExtendedFixSession fixSession)
Parameters
Type | Name | Description |
---|---|---|
IExtendedFixSession | fixSession |
RegisterFixSession(IExtendedFixSession)
Registers a new session
Declaration
public void RegisterFixSession(IExtendedFixSession session)
Parameters
Type | Name | Description |
---|---|---|
IExtendedFixSession | session |
RegisterSessionManagerListener(IFixSessionListListener)
Register client IFixSessionListListener.
Declaration
public void RegisterSessionManagerListener(IFixSessionListListener listener)
Parameters
Type | Name | Description |
---|---|---|
IFixSessionListListener | listener |
RemoveAllSessions()
Remove all sessions.
Declaration
public void RemoveAllSessions()
RemoveFixSession(IExtendedFixSession)
Removes the session
.
Declaration
public void RemoveFixSession(IExtendedFixSession session)
Parameters
Type | Name | Description |
---|---|---|
IExtendedFixSession | session |
RemoveTask(ISessionManagerTask)
Removes the task.
Declaration
public bool RemoveTask(ISessionManagerTask task)
Parameters
Type | Name | Description |
---|---|---|
ISessionManagerTask | task | the task to remove |
Returns
Type | Description |
---|---|
System.Boolean |
ResetSeqNums(SessionParameters)
Declaration
public static bool ResetSeqNums(SessionParameters params)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | params |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.IO.IOException |
ScheduleTask(SchedulerTask, Int64)
Added scheduled task.
Declaration
public void ScheduleTask(SchedulerTask schedulerTask, long scheduleTimestamp)
Parameters
Type | Name | Description |
---|---|---|
SchedulerTask | schedulerTask | the task |
System.Int64 | scheduleTimestamp | the timestamp |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | if task was scheduled. |
ScheduleTask(SchedulerTask, Int64, Int32)
Added scheduled task.
Declaration
public void ScheduleTask(SchedulerTask schedulerTask, long scheduleTimestamp, int period)
Parameters
Type | Name | Description |
---|---|---|
SchedulerTask | schedulerTask | the task |
System.Int64 | scheduleTimestamp | the timestamp |
System.Int32 | period | the period |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | if task was scheduled. |
SetSeqNums(SessionParameters, Int32, Int32)
Declaration
public static bool SetSeqNums(SessionParameters params, int inSeqNum, int outSeqNum)
Parameters
Type | Name | Description |
---|---|---|
SessionParameters | params | |
System.Int32 | inSeqNum | |
System.Int32 | outSeqNum |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.IO.IOException |
Shutdown()
Shutdown the FixAntenna engine, i.e. FixSessionManager, LicenseManager, SchedulerManager.
Declaration
public void Shutdown()
Remarks
FixSessionManager shutting down automatically when the application exits. Use this method only if you need to force shutdown the engine.
UnregisterSessionManagerListener(IFixSessionListListener)
Unregister client IFixSessionListListener.
Declaration
public void UnregisterSessionManagerListener(IFixSessionListListener listener)
Parameters
Type | Name | Description |
---|---|---|
IFixSessionListListener | listener |