/** * @return the default application version ID for messages sent from this session */ public ApplVerID getSenderDefaultApplicationVersionID() { return new ApplVerID(senderDefaultApplVerID.getValue()); }
/** * @return the default application version ID for messages sent from this session */ public ApplVerID getSenderDefaultApplicationVersionID() { return new ApplVerID(senderDefaultApplVerID.getValue()); }
/** * @return the default application version ID for messages sent from this session */ public ApplVerID getSenderDefaultApplicationVersionID() { return new ApplVerID(senderDefaultApplVerID.getValue()); }
public quickfix.field.ApplVerID getApplVerID() throws FieldNotFound { return get(new quickfix.field.ApplVerID()); }
public quickfix.field.ApplVerID getApplVerID() throws FieldNotFound { return get(new quickfix.field.ApplVerID()); }
public quickfix.field.ApplVerID getApplVerID() throws FieldNotFound { return get(new quickfix.field.ApplVerID()); }
public quickfix.field.ApplVerID getApplVerID() throws FieldNotFound { return get(new quickfix.field.ApplVerID()); }
private ApplVerID toApplVerID(String value) { if (isApplVerIdEnum(value)) { return new ApplVerID(value); } else { // value should be a beginString return MessageUtils.toApplVerID(value); } }
private ApplVerID toApplVerID(String value) { if (isApplVerIdEnum(value)) { return new ApplVerID(value); } else { // value should be a beginString return MessageUtils.toApplVerID(value); } }
private ApplVerID toApplVerID(String value) { if (isApplVerIdEnum(value)) { return new ApplVerID(value); } else { // value should be a beginString return MessageUtils.toApplVerID(value); } }
private ApplVerID getApplVerID(Session session, Message message) { String beginString = session.getSessionID().getBeginString(); if (FixVersions.BEGINSTRING_FIXT11.equals(beginString)) { return new ApplVerID(ApplVerID.FIX50); } else { return MessageUtils.toApplVerID(beginString); } }
private static ApplVerID getApplVerID(Session session, String messageString) throws InvalidMessage { ApplVerID applVerID = null; final String applVerIdString = getStringField(messageString, ApplVerID.FIELD); if (applVerIdString != null) { applVerID = new ApplVerID(applVerIdString); } if (applVerID == null) { applVerID = session.getTargetDefaultApplicationVersionID(); } if (applVerID == null && isLogon(messageString)) { final String defaultApplVerIdString = getStringField(messageString, DefaultApplVerID.FIELD); if (defaultApplVerIdString != null) { applVerID = new ApplVerID(defaultApplVerIdString); } } if (applVerID == null) { throw new InvalidMessage("Can't determine ApplVerID for message"); } return applVerID; }
@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; }
private static ApplVerID getApplVerID(Session session, String messageString) throws InvalidMessage { ApplVerID applVerID = null; final String applVerIdString = getStringField(messageString, ApplVerID.FIELD); if (applVerIdString != null) { applVerID = new ApplVerID(applVerIdString); } if (applVerID == null) { applVerID = session.getTargetDefaultApplicationVersionID(); } if (applVerID == null && isLogon(messageString)) { final String defaultApplVerIdString = getStringField(messageString, DefaultApplVerID.FIELD); if (defaultApplVerIdString != null) { applVerID = new ApplVerID(defaultApplVerIdString); } } if (applVerID == null) { throw newInvalidMessageException("Can't determine ApplVerID from message " + messageString, getMinimalMessage(messageString)); } return applVerID; }
@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; }
/** * Add the application version to the given message, if applicable. * * @param inMessage a <code>Message</code> value */ private void addApplicationVersion(Message inMessage) { FIXVersion fixVersion = getFixVersion(); if(!fixVersion.isFixT()) { return; } inMessage.getHeader().setField(new quickfix.field.ApplVerID(fixVersion.getApplicationVersion())); } /**
/** * Set the application version, if necessary. * * @param inMessage a <code>Message</code> value * @return a <code>Message</code> value */ protected Message addApplVersion(Message inMessage) { if(inMessage.getHeader().isSetField(quickfix.field.ApplVerID.FIELD)) { return inMessage; } inMessage.getHeader().setField(new quickfix.field.ApplVerID(getFixVersion().getApplicationVersion())); return inMessage; } /* (non-Javadoc)
@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); }