public DataDictionary getDataDictionary() { if (!sessionID.isFIXT()) { // For pre-FIXT sessions, the session data dictionary is the same as the application // data dictionary. return dataDictionaryProvider.getSessionDataDictionary(sessionID.getBeginString()); } else { throw new SessionException("No default data dictionary for FIXT 1.1 and newer"); } }
public DataDictionary getDataDictionary() { if (!sessionID.isFIXT()) { // For pre-FIXT sessions, the session data dictionary is the same as the application // data dictionary. return dataDictionaryProvider.getSessionDataDictionary(sessionID.getBeginString()); } else { throw new SessionException("No default data dictionary for FIXT 1.1 and newer"); } }
public DataDictionary getDataDictionary() { if (!sessionID.isFIXT()) { // For pre-FIXT sessions, the session data dictionary is the same as the application // data dictionary. return dataDictionaryProvider.getSessionDataDictionary(sessionID.getBeginString()); } else { throw new SessionException("No default data dictionary for FIXT 1.1 and newer"); } }
/** * Get the FIX version from the given session ID. * * @param inSessionId a <code>SessionID</code> value * @return a <code>FIXVersion</code> value */ public static FIXVersion getFIXVersion(SessionID inSessionId) { if(inSessionId.isFIXT()) { // this is a FIXT message _and_ ApplVerID is _not_ set, we need to know something about the session Session session = Session.lookupSession(inSessionId); if(session == null) { throw new UnsupportedOperationException(Messages.APPL_VERID_REQUIRED.getText()); } quickfix.field.ApplVerID defaultAppVerId = session.getSenderDefaultApplicationVersionID(); if(defaultAppVerId == null) { throw new UnsupportedOperationException(Messages.APPL_VERID_REQUIRED.getText()); } return getFIXVersion(defaultAppVerId); } else { return getFIXVersion(inSessionId.getBeginString()); } } /**
@Override protected void processMessage(IoSession protocolSession, Message message) throws Exception { if (message.getHeader().getString(MsgType.FIELD).equals(MsgType.LOGON)) { final SessionID sessionID = MessageUtils.getReverseSessionID(message); if (sessionID.isFIXT()) { if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(message.getString(DefaultApplVerID.FIELD)); quickfixSession.setTargetDefaultApplicationVersionID(applVerID); quickfixSession.getLog().onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon"); } } } eventHandlingStrategy.onMessage(quickfixSession, message); }
@Override protected void processMessage(IoSession protocolSession, Message message) throws Exception { if (message.getHeader().getString(MsgType.FIELD).equals(MsgType.LOGON)) { final SessionID sessionID = MessageUtils.getReverseSessionID(message); if (sessionID.isFIXT()) { if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(message.getString(DefaultApplVerID.FIELD)); quickfixSession.setTargetDefaultApplicationVersionID(applVerID); quickfixSession.getLog().onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon"); } } } eventHandlingStrategy.onMessage(quickfixSession, message); }
@Override protected void processMessage(IoSession protocolSession, Message message) throws Exception { if (message.getHeader().getString(MsgType.FIELD).equals(MsgType.LOGON)) { final SessionID sessionID = MessageUtils.getReverseSessionID(message); if (sessionID.isFIXT()) { if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(message.getString(DefaultApplVerID.FIELD)); quickfixSession.setTargetDefaultApplicationVersionID(applVerID); quickfixSession.getLog().onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon"); } } } eventHandlingStrategy.onMessage(quickfixSession, message); }
/** * Get the <code>FIXVersion</code> of the given message. * * @param inMessage a <code>Message</code> value * @return a <code>FIXVersion</code> value * @throws FieldNotFound if the given message is malformed and the version cannot be identified * @throws IllegalArgumentException if the FIX version of the given message is unsupported */ public static FIXVersion getFIXVersion(Message inMessage) throws FieldNotFound { SessionID sessionId = MessageUtils.getSessionID(inMessage); if(sessionId.isFIXT()) { if(inMessage.getHeader().isSetField(quickfix.field.ApplVerID.FIELD)) { return doFixApplicationVersionLookup(inMessage.getHeader().getString(quickfix.field.ApplVerID.FIELD)); } // this is a FIXT message _and_ ApplVerID is _not_ set, we need to know something about the session Session session = Session.lookupSession(sessionId); if(session == null) { throw new UnsupportedOperationException(Messages.APPL_VERID_REQUIRED.getText()); } quickfix.field.ApplVerID defaultAppVerId = session.getTargetDefaultApplicationVersionID(); return getFIXVersion(defaultAppVerId); } else { return doFixVersionLookup(inMessage.getHeader().getString(quickfix.field.BeginString.FIELD)); } } /**
if (!sessionID.isFIXT()) { targetDefaultApplVerID.set(MessageUtils.toApplVerID(sessionID.getBeginString()));
if (!sessionID.isFIXT()) { targetDefaultApplVerID.set(MessageUtils.toApplVerID(sessionID.getBeginString()));
if (!sessionID.isFIXT()) { targetDefaultApplVerID.set(MessageUtils.toApplVerID(sessionID.getBeginString()));
networkingOptions.getSynchronousWrites(), networkingOptions .getSynchronousWriteTimeout(), qfSession.getMaxScheduledWriteRequests())); if (sessionID.isFIXT()) { // QFJ-592 if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(
networkingOptions.getSynchronousWrites(), networkingOptions .getSynchronousWriteTimeout(), qfSession.getMaxScheduledWriteRequests())); if (sessionID.isFIXT()) { // QFJ-592 if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(
networkingOptions.getSynchronousWrites(), networkingOptions .getSynchronousWriteTimeout(), qfSession.getMaxScheduledWriteRequests())); if (sessionID.isFIXT()) { // QFJ-592 if (message.isSetField(DefaultApplVerID.FIELD)) { final ApplVerID applVerID = new ApplVerID(
if (sessionID.isFIXT()) { logon.setField(senderDefaultApplVerID);
private boolean generateLogon() throws IOException { final Message logon = messageFactory.create(sessionID.getBeginString(), MsgType.LOGON); logon.setInt(EncryptMethod.FIELD, 0); logon.setInt(HeartBtInt.FIELD, state.getHeartBeatInterval()); if (sessionID.isFIXT()) { logon.setField(DefaultApplVerID.FIELD, senderDefaultApplVerID); } if (isStateRefreshNeeded(MsgType.LOGON)) { getLog().onEvent("Refreshing message/state store at logon"); getStore().refresh(); stateListener.onRefresh(); } if (resetOnLogon) { resetState(); } if (isResetNeeded()) { logon.setBoolean(ResetSeqNumFlag.FIELD, true); } state.setLastReceivedTime(SystemTime.currentTimeMillis()); state.clearTestRequestCounter(); state.setLogonSent(true); logonAttempts++; if (enableNextExpectedMsgSeqNum) { final int nextExpectedMsgNum = getExpectedTargetNum(); logon.setInt(NextExpectedMsgSeqNum.FIELD, nextExpectedMsgNum); state.setLastExpectedLogonNextSeqNum(nextExpectedMsgNum); } return sendRaw(logon, 0); }
private boolean generateLogon() throws IOException { final Message logon = messageFactory.create(sessionID.getBeginString(), MsgType.LOGON); logon.setInt(EncryptMethod.FIELD, 0); logon.setInt(HeartBtInt.FIELD, state.getHeartBeatInterval()); if (sessionID.isFIXT()) { logon.setField(DefaultApplVerID.FIELD, senderDefaultApplVerID); } if (isStateRefreshNeeded(MsgType.LOGON)) { getLog().onEvent("Refreshing message/state store at logon"); getStore().refresh(); stateListener.onRefresh(); } if (resetOnLogon) { resetState(); } if (isResetNeeded()) { logon.setBoolean(ResetSeqNumFlag.FIELD, true); } state.setLastReceivedTime(SystemTime.currentTimeMillis()); state.clearTestRequestCounter(); state.setLogonSent(true); logonAttempts++; if (enableNextExpectedMsgSeqNum) { final int nextExpectedMsgNum = getExpectedTargetNum(); logon.setInt(NextExpectedMsgSeqNum.FIELD, nextExpectedMsgNum); state.setLastExpectedLogonNextSeqNum(nextExpectedMsgNum); } return sendRaw(logon, 0); }
if (sessionID.isFIXT()) { logon.setField(senderDefaultApplVerID);
if (sessionID.isFIXT()) { logon.setField(senderDefaultApplVerID);
private boolean generateLogon() throws IOException { final Message logon = messageFactory.create(sessionID.getBeginString(), MsgType.LOGON); logon.setInt(EncryptMethod.FIELD, 0); logon.setInt(HeartBtInt.FIELD, state.getHeartBeatInterval()); if (sessionID.isFIXT()) { logon.setField(DefaultApplVerID.FIELD, senderDefaultApplVerID); } if (isStateRefreshNeeded(MsgType.LOGON)) { getLog().onEvent("Refreshing message/state store at logon"); getStore().refresh(); stateListener.onRefresh(); } if (resetOnLogon) { resetState(); } if (isResetNeeded()) { logon.setBoolean(ResetSeqNumFlag.FIELD, true); } state.setLastReceivedTime(SystemTime.currentTimeMillis()); state.clearTestRequestCounter(); state.setLogonSent(true); logonAttempts++; if (enableNextExpectedMsgSeqNum) { final int nextExpectedMsgNum = getExpectedTargetNum(); logon.setInt(NextExpectedMsgSeqNum.FIELD, nextExpectedMsgNum); state.setLastExpectedLogonNextSeqNum(nextExpectedMsgNum); } return sendRaw(logon, 0); }