|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.fixengine.manager.FIXSessionManager
public 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.
for such sessions.
Method Summary | |
---|---|
void |
addTask(SessionManagerTask task)
Adds a new session manager task. |
void |
cancelScheduleTask(SchedulerTask schedulerTask)
Remove scheduled task. |
static void |
closeAllSession()
Methods close all sessions. |
protected static String |
decode(byte[] cipher)
|
static void |
disposeAllSession()
Methods dispose all sessions. |
boolean |
exists(String sessionID)
Returns true if session with senderCompID and targetCompID exists. |
void |
getCopyList(List<ExtendedFIXSession> copyTo)
|
static FIXSessionManager |
getFIXSessionManager()
Gets the FIXSessionManager instance. |
List<ExtendedFIXSession> |
getList()
Gets the session list. |
int |
getSessionSize()
|
long |
getWaitTime()
Gets a wait time. |
ExtendedFIXSession |
locate(SessionID sessionID)
Finds the session by sessionID. |
ExtendedFIXSession |
locate(SessionParameters params)
|
ExtendedFIXSession |
locate(String sessionID)
Finds the session by sessionID. |
ExtendedFIXSession |
locate(String senderComId,
String senderSubId,
String senderLocationId,
String targetCompId,
String targetSubId,
String targetLocationId)
TODO: implement ASAP |
ExtendedFIXSession |
locateFirst(String senderCompID,
String targetCompID)
Finds the session with senderCompID and targetCompID. |
protected void |
notifySessionAdd(ExtendedFIXSession fixSession)
|
protected void |
notifySessionRemoved(ExtendedFIXSession fixSession)
|
void |
registerFIXSession(ExtendedFIXSession session)
Registers a new session |
void |
registerSessionManagerListener(FIXSessionListListener listener)
Register client FIXSessionListListener. |
void |
removeAllSessions()
Remove all sessions. |
void |
removeFIXSession(ExtendedFIXSession session)
Removes the session . |
boolean |
removeTask(SessionManagerTask task)
Removes the task. |
static boolean |
resetSeqNums(SessionParameters params)
|
void |
scheduleTask(SchedulerTask schedulerTask,
long scheduleTimestamp)
Added scheduled task. |
void |
scheduleTask(SchedulerTask schedulerTask,
long scheduleTimestamp,
long period)
Added scheduled task. |
static boolean |
setSeqNums(SessionParameters params,
int inSeqNum,
int outSeqNum)
|
void |
setWaitTime(long waitTime)
Sets a wait time. |
void |
unregisterSessionManagerListener(FIXSessionListListener listener)
Unregister client FIXSessionListListener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final long getWaitTime()
public final void setWaitTime(long waitTime)
public final void addTask(SessionManagerTask task)
task
- the task to addpublic final boolean removeTask(SessionManagerTask task)
task
- the task to removepublic final void scheduleTask(SchedulerTask schedulerTask, long scheduleTimestamp)
schedulerTask
- the taskscheduleTimestamp
- the timestamp
IllegalStateException
- if task was scheduled.public final void scheduleTask(SchedulerTask schedulerTask, long scheduleTimestamp, long period)
schedulerTask
- the taskscheduleTimestamp
- the timestampperiod
- the period
IllegalStateException
- if task was scheduled.public final void cancelScheduleTask(SchedulerTask schedulerTask)
public static final FIXSessionManager getFIXSessionManager()
FIXSessionManager
instance.
public final void registerFIXSession(ExtendedFIXSession session)
session
session
- public final void removeFIXSession(ExtendedFIXSession session)
session
.
session
- public final void removeAllSessions()
public final ExtendedFIXSession locate(String sessionID)
sessionID
- the unique session identifierpublic final ExtendedFIXSession locate(SessionID sessionID)
sessionID
- the unique session identifierpublic final ExtendedFIXSession locate(SessionParameters params)
public final ExtendedFIXSession locate(String senderComId, String senderSubId, String senderLocationId, String targetCompId, String targetSubId, String targetLocationId)
senderComId
- senderSubId
- senderLocationId
- targetCompId
- targetSubId
- targetLocationId
-
public final ExtendedFIXSession locateFirst(String senderCompID, String targetCompID)
senderCompID
- the sender comp idtargetCompID
- the target comp idpublic final boolean exists(String sessionID)
sessionID
- the unique session identifierpublic final List<ExtendedFIXSession> getList()
public final void getCopyList(List<ExtendedFIXSession> copyTo)
public final int getSessionSize()
public final void registerSessionManagerListener(FIXSessionListListener listener)
listener
- public final void unregisterSessionManagerListener(FIXSessionListListener listener)
listener
- protected final void notifySessionAdd(ExtendedFIXSession fixSession)
protected final void notifySessionRemoved(ExtendedFIXSession fixSession)
public static void closeAllSession()
public static void disposeAllSession()
public static boolean resetSeqNums(SessionParameters params) throws IOException
params
-
IOException
public static boolean setSeqNums(SessionParameters params, int inSeqNum, int outSeqNum) throws IOException
params
- inSeqNum
- outSeqNum
-
IOException
protected static String decode(byte[] cipher)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |