StringField getField(int field) throws FieldNotFound { final StringField f = (StringField) fields.get(field); if (f == null) { throw new FieldNotFound(field); } return f; }
private String getMsgType() throws InvalidMessage { try { return header.getString(MsgType.FIELD); } catch (final FieldNotFound e) { throw MessageUtils.newInvalidMessageException(e.getMessage() + " in " + messageData, this); } }
@Override public void fromApp(Message message, SessionID sessionID) { try { String msgType = message.getHeader().getString(35); switch (msgType) { case MsgType.QUOTE_REQUEST: String reqId = message.getString(QuoteReqID.FIELD); subscriptions.put(reqId, sessionID); LOGGER.debug("Subscribed with QuoteReqID={}", reqId); break; case MsgType.QUOTE_CANCEL: reqId = message.getString(QuoteReqID.FIELD); subscriptions.remove(reqId); LOGGER.debug("Unsubscribed with QuoteReqID={}", reqId); break; } } catch (FieldNotFound fieldNotFound) { fieldNotFound.printStackTrace(); } }
private String getMsgType() throws InvalidMessage { try { return header.getString(MsgType.FIELD); } catch (final FieldNotFound e) { throw MessageUtils.newInvalidMessageException(e.getMessage() + " in " + messageData, this); } }
private String getMsgType() throws InvalidMessage { try { return header.getString(MsgType.FIELD); } catch (final FieldNotFound e) { throw new InvalidMessage(e.getMessage() + " in " + messageData); } }
StringField getField(int field) throws FieldNotFound { final StringField f = (StringField) fields.get(field); if (f == null) { throw new FieldNotFound(field); } return f; }
/** * {@inheritDoc} */ @Override public void toAdmin(Message message, SessionID sessionId) { String msgType; try { msgType = message.getHeader().getString(MsgType.FIELD); } catch (FieldNotFound e) { throw new RuntimeException(e.getMessage(), e); } if (MsgType.LOGON.equals(msgType) || MsgType.HEARTBEAT.equals(msgType)) { message.setField(new Username(apiKey)); message.setField(new Password(secretKey)); } if (log.isTraceEnabled()) { log.trace("toAdmin: {}", message); log.trace("toAdmin: {}", message.toXML(dataDictionary)); } }
StringField getField(int field) throws FieldNotFound { final StringField f = (StringField) fields.get(field); if (f == null) { throw new FieldNotFound(field); } return f; }
/** * {@inheritDoc} */ @Override public void toAdmin(Message message, SessionID sessionId) { super.toAdmin(message, sessionId); String msgType; try { msgType = message.getHeader().getString(MsgType.FIELD); } catch (FieldNotFound e) { throw new RuntimeException(e.getMessage(), e); } if (MsgType.LOGON.equals(msgType)) { message.setField(new Username(accessKey)); message.setField(new Password(secretKey)); } }
public Group getGroup(int num, int groupTag) throws FieldNotFound { List<Group> groupList = getGroups(groupTag); if (num > groupList.size()) { throw new FieldNotFound(groupTag + ", index=" + num); } return groupList.get(num - 1); }
public Group getGroup(int num, int groupTag) throws FieldNotFound { List<Group> groupList = getGroups(groupTag); if (num > groupList.size()) { throw new FieldNotFound(groupTag + ", index=" + num); } return groupList.get(num - 1); }
public Group getGroup(int num, int groupTag) throws FieldNotFound { List<Group> groupList = getGroups(groupTag); if (num > groupList.size()) { throw new FieldNotFound(groupTag + ", index=" + num); } return groupList.get(num - 1); }
public Group getGroup(int num, Group group) throws FieldNotFound { final List<Group> groupList = getGroups(group.getFieldTag()); if (num > groupList.size()) { throw new FieldNotFound(group.getFieldTag() + ", index=" + num); } final Group grp = groupList.get(num - 1); group.setFields(grp); group.setGroups(grp); return group; }
public Group getGroup(int num, Group group) throws FieldNotFound { final List<Group> groupList = getGroups(group.getFieldTag()); if (num > groupList.size()) { throw new FieldNotFound(group.getFieldTag() + ", index=" + num); } final Group grp = groupList.get(num - 1); group.setFields(grp); group.setGroups(grp); return group; }
public BytesField getField(BytesField field) throws FieldNotFound { final Field<?> returnField = fields.get(field.getField()); if (returnField == null) { throw new FieldNotFound(field.getField()); } else if (returnField instanceof BytesField) { return (BytesField) returnField; } else { throw new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, field.getField()); } }
public BytesField getField(BytesField field) throws FieldNotFound { final Field<?> returnField = fields.get(field.getField()); if (returnField == null) { throw new FieldNotFound(field.getField()); } else if (returnField instanceof BytesField) { return (BytesField) returnField; } else { throw new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, field.getField()); } }
public BytesField getField(BytesField field) throws FieldNotFound { final Field<?> returnField = fields.get(field.getField()); if (returnField == null) { throw new FieldNotFound(field.getField()); } else if (returnField instanceof BytesField) { return (BytesField) returnField; } else { throw new FieldException(SessionRejectReason.INCORRECT_DATA_FORMAT_FOR_VALUE, field.getField()); } }
public Group getGroup(int num, Group group) throws FieldNotFound { final List<Group> groupList = getGroups(group.getFieldTag()); if (num > groupList.size()) { throw new FieldNotFound(group.getFieldTag() + ", index=" + num); } final Group grp = groupList.get(num - 1); group.setFields(grp); group.setGroups(grp); return group; }