public class InitiatorFIXSession extends AbstractFIXSession
AbstractFIXSession.ConsumingControlTransportWrapper
Modifier and Type | Field and Description |
---|---|
protected static Log |
log |
configuration, DEBUG_ENABLED, graceful, listener, messageFactory, preferredSendingMode, queue, runtimeState, sentTRNum, sequenceManager, sessionLock, sessionParameters, testRequestTime, TRACE_ENABLED, transport
DEFAULT_SENDING_OPTIONS, SEND_ASYNC, SEND_SYNC
Constructor and Description |
---|
InitiatorFIXSession(FIXMessageFactory factory,
SessionParameters sessionParameters,
HandlerChain fixSessionListener)
Creates the
InitiatorFIXSession . |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Connects to remote counterparty,
if initiator or accepts incoming connection if acceptor.
|
protected void |
connectInternal() |
void |
disconnect(String reason)
Disconnect the session.
|
void |
dispose()
Disposes current session, removes its reference from GlobalSessionManager
and frees all allocated resources.
|
protected FIXTransport |
getTransport(SessionParameters sessionParameters,
String host,
int port)
Gets transport.
|
void |
init()
Initialize FIX session.
|
protected void |
initTransport() |
void |
reject(String reason)
Unsupported for InitiatorFIXSession.
|
void |
setSessionState(SessionState sessionState)
Sets session state.
|
addInSessionLevelMessageListener, addOutSessionLevelMessageListener, addSessionStateListener, addUserGlobalMessageHandler, backupStorages, checkHasSessionSendOrReceivedTestRequest, checkSessionInactiveAndSendHbt, clearQueue, disconnect, disconnect, disconnect, disconnect, disconnectTestRequestIsLost, equals, forcedDisconnect, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsLong, getBytesRead, getBytesSent, getConfiguration, getEncryption, getErrorHandler, getEstablished, getExtendedFIXSessionListener, getFIXSessionOutOfSyncListener, getIncomingMessageStorage, getInSeqNum, getLastDisconnectReason, getLastInMessageTimestamp, getLastOutMessageTimestamp, getMessageFactory, getMessageHandlers, getMessageQueue, getMessageValidator, getNoOfInMessages, getNoOfOutMessages, getOutgoingMessageStorage, getOutSeqNum, getQueuedMessagesCount, getRejectMessageListener, getRuntimeState, getSequenceManager, getSessionParameters, getSessionParametersInstance, getSessionState, getSlowConsumerListener, getStorageFactory, hashCode, initSessionInternal, initSessionRuntimeState, isHbtControlInPumper, isResetSeqNumFlagRequiredForInitLogon, isStatisticEnabled, lockSending, markShutdownAsGraceful, onDisconnect, prepareForConnect, prepareMessage, prepareMessage, prepareMessage, prepareMessageFromString, prepareMessageFromString, reinit, removeAttribute, removeAttribute, removeLongAttribute, removeSessionStateListener, resetInitialization, resetSequenceNumbers, resetSequenceNumbers, resetTestRequestFlags, restoreSessionAfterReceivedTestRequest, saveSessionParameters, sendAsIs, sendAsIs, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageAndGetQueueSize, sendMessageAndGetQueueSize, sendMessageOutOfTurn, sendTestRequest, sendWithChanges, sendWithChanges, sendWithChangesAndGetQueueSize, sendWithChangesAndGetQueueSize, setAttribute, setAttribute, setAttribute, setAttribute, setErrorHandler, setFIXSessionListener, setFIXSessionOutOfSyncListener, setInSeqNum, setLastDisconnectReason, setOutOfTurnMode, setOutSeqNum, setPreLogoffSessionState, setRejectMessageListener, setSequenceNumbers, setSlowConsumerListener, shutdown, shutdown, startSession, subscribeForAttributeChanges, toString, unlockSending
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAndRemoveAttribute
protected static final Log log
public InitiatorFIXSession(FIXMessageFactory factory, SessionParameters sessionParameters, HandlerChain fixSessionListener)
InitiatorFIXSession
.protected FIXTransport getTransport(SessionParameters sessionParameters, String host, int port)
sessionParameters
- the session parametershost
- the hostport
- the portpublic void init() throws IOException
FIXSession
init
in interface FIXSession
init
in class AbstractFIXSession
IOException
- I/O exception if error occurredpublic void connect() throws IOException
FIXSession
connect
in interface FIXSession
connect
in class AbstractFIXSession
IOException
- I/O exception if error occurredFIXSession.reject(String)
public void setSessionState(SessionState sessionState)
ExtendedFIXSession
setSessionState
in interface ExtendedFIXSession
setSessionState
in class AbstractFIXSession
sessionState
- the new session stateExtendedFIXSession.setSessionState(com.epam.fixengine.SessionState)
public void reject(String reason) throws IOException
reject
in interface FIXSession
reject
in class AbstractFIXSession
IllegalStateException
IOException
- I/O exception if error occurredFIXSession.reject(String)
protected void connectInternal() throws IOException
IOException
protected void initTransport()
public void disconnect(String reason)
AbstractFIXSession
The method sends the logof message, if response is not received during the HBI, shutdown the session.
disconnect
in interface FIXSession
disconnect
in class AbstractFIXSession
reason
- the reason, if parameter is not null,
the logof message will be send with 58=reason.FIXSession.disconnect(String)
public void dispose()
FIXSession
dispose
in interface FIXSession
dispose
in class AbstractFIXSession
FIXSession.dispose()
Copyright © 2000–2022 EPAM Systems. All rights reserved.