|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.fixengine.session.AbstractFIXSession com.epam.fixengine.session.InitiatorFIXSession com.epam.fixengine.session.BackupFIXSession
public abstract class BackupFIXSession
The BackupFIXSession
provides ability to switch the connection from
the primary host to backup and vice versa.
The backup session should configured by engine.properties and default.properties configuration files.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.epam.fixengine.session.AbstractFIXSession |
---|
AbstractFIXSession.SessionParametersProxyAdaptorListener |
Field Summary |
---|
Fields inherited from class com.epam.fixengine.session.AbstractFIXSession |
---|
configuration, DEBUG_ENABLED, graceful, listener, log, messageFactory, queue, sessionLock, sessionParameters, TRACE_ENABLED, transport |
Fields inherited from interface com.epam.fixengine.FIXSession |
---|
DEFAULT_SENDING_OPTIONS, SEND_ASYNC, SEND_SYNC |
Constructor Summary | |
---|---|
BackupFIXSession(FIXMessageFactory factory,
SessionParameters sessionParameters,
HandlerChain fixSessionListener)
|
Method Summary | |
---|---|
void |
connect()
Connects to remote counterparty, if initiator or accepts incoming connection if acceptor. |
protected int |
getAttempt()
Gets current connection attempts. |
protected void |
incrementAttempt()
The synchronized method to increment attempt. |
protected void |
initSession()
Initializes the resources and sends a logon message. |
protected boolean |
isBackupInitiator()
|
boolean |
isRunningOnBackup()
Returns true, if session connected to backup host. |
protected void |
setAttempt(int attempt)
Sets current connection attempts. |
protected void |
setBackupInitiator(boolean backupInitiator)
|
void |
setFIXSessionListener(FIXSessionListener listener)
Sets FIXSession listener to monitor session status and receive incoming messages. |
protected void |
setRunningOnBackup(Boolean value)
Sets the connection state. |
void |
switchToBackUp()
The method, switch current connection to backup. |
void |
switchToPrimary()
The method, switch current connection to primary. |
Methods inherited from class com.epam.fixengine.session.InitiatorFIXSession |
---|
connectInternal, disconnect, dispose, getTransport, reject, setSessionState |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BackupFIXSession(FIXMessageFactory factory, SessionParameters sessionParameters, HandlerChain fixSessionListener)
Method Detail |
---|
public void connect() throws IOException
FIXSession
connect
in interface FIXSession
connect
in class InitiatorFIXSession
IOException
- I/O exception if error occurredFIXSession.reject(String)
protected int getAttempt()
protected void setAttempt(int attempt)
attempt
- the current connection attemptprotected void incrementAttempt()
protected boolean isBackupInitiator()
protected void setBackupInitiator(boolean backupInitiator)
public void setFIXSessionListener(FIXSessionListener listener)
FIXSession
setFIXSessionListener
in interface FIXSession
setFIXSessionListener
in class AbstractFIXSession
listener
- the user specified listenerFIXSession.setFIXSessionListener(FIXSessionListener)
public boolean isRunningOnBackup()
protected void setRunningOnBackup(Boolean value)
value
- the new valuepublic void switchToBackUp()
public void switchToPrimary()
protected void initSession() throws IOException
AbstractFIXSession
initSession
in class AbstractFIXSession
IOException
- - if I/O error occurred.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |