|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.
| Field Summary |
|---|
| Fields inherited from class com.epam.fixengine.session.AbstractFIXSession |
|---|
configuration, listener, log, messageFactory, queue, sessionLock, sessionParameters, transport |
| 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 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 |
| 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 FIXSessionconnect in class InitiatorFIXSessionIOException - I/O exception if error occurredprotected 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 FIXSessionsetFIXSessionListener in class AbstractFIXSessionlistener - the user specified listenerFIXSession.setFIXSessionListener(FIXSessionListener)public boolean isRunningOnBackup()
protected void setRunningOnBackup(Boolean value)
value - the new valuepublic void switchToBackUp()
public void switchToPrimary()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||