/** * Convert an ApplVerID to a "begin string" * * @param applVerID * @return the begin string for the specified ApplVerID. * @throws QFJException if conversion fails. * @see ApplVerID */ public static String toBeginString(ApplVerID applVerID) throws QFJException { final String beginString = applVerIDtoBeginString.get(applVerID.getValue()); if (beginString == null) { throw new QFJException("Unknown or unsupported ApplVerID: " + applVerID.getValue()); } return beginString; }
/** * Convert an ApplVerID to a "begin string" * * @param applVerID * @return the begin string for the specified ApplVerID. * @throws QFJException if conversion fails. * @see ApplVerID */ public static String toBeginString(ApplVerID applVerID) throws QFJException { final String beginString = applVerIDtoBeginString.get(applVerID.getValue()); if (beginString == null) { throw new QFJException("Unknown or unsupported ApplVerID: " + applVerID.getValue()); } return beginString; }
/** * Convert an ApplVerID to a "begin string" * * @param applVerID * @return the begin string for the specified ApplVerID. * @throws QFJException if conversion fails. * @see ApplVerID */ public static String toBeginString(ApplVerID applVerID) throws QFJException { final String beginString = applVerIDtoBeginString.get(applVerID.getValue()); if (beginString == null) { throw new QFJException("Unknown or unsupported ApplVerID: " + applVerID.getValue()); } return beginString; }
switch(inApplVerId.getValue()) { case quickfix.field.ApplVerID.FIX40: return FIX40;
@Override public Message create(String beginString, ApplVerID applVerID, String msgType) { MessageFactory messageFactory = messageFactories.get(beginString); if (beginString.equals(BEGINSTRING_FIXT11) && !MessageUtils.isAdminMessage(msgType)) { if (applVerID == null) { applVerID = new ApplVerID(defaultApplVerID.getValue()); } messageFactory = messageFactories.get(MessageUtils.toBeginString(applVerID)); } if (messageFactory != null) { return messageFactory.create(beginString, applVerID, msgType); } Message message = new Message(); message.getHeader().setString(MsgType.FIELD, msgType); return message; }
@Override public Message create(String beginString, ApplVerID applVerID, String msgType) { MessageFactory messageFactory = messageFactories.get(beginString); if (beginString.equals(BEGINSTRING_FIXT11) && !MessageUtils.isAdminMessage(msgType)) { if (applVerID == null) { applVerID = new ApplVerID(defaultApplVerID.getValue()); } messageFactory = messageFactories.get(MessageUtils.toBeginString(applVerID)); } if (messageFactory != null) { return messageFactory.create(beginString, applVerID, msgType); } Message message = new Message(); message.getHeader().setString(MsgType.FIELD, msgType); return 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); }
@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); }
qfSession.setTargetDefaultApplicationVersionID(applVerID); sessionLog.onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon");
qfSession.setTargetDefaultApplicationVersionID(applVerID); sessionLog.onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon");
qfSession.setTargetDefaultApplicationVersionID(applVerID); sessionLog.onEvent("Setting DefaultApplVerID (" + DefaultApplVerID.FIELD + "=" + applVerID.getValue() + ") from Logon");