public FIXMessageParser(FIXMessageListener listener, FIXMessage message, boolean checkSumEnabled) { this.listener = listener; this.message = message; this.checkSumEnabled = checkSumEnabled; this.beginString = new FIXValue(BEGIN_STRING_FIELD_CAPACITY); this.bodyLength = new FIXValue(BODY_LENGTH_FIELD_CAPACITY); this.checkSum = new FIXValue(CHECK_SUM_FIELD_CAPACITY); }
/** * Construct a new message container. * * @param maxFieldCount the maximum number of fields * @param fieldCapacity the field capacity */ public FIXMessage(int maxFieldCount, int fieldCapacity) { tags = new int[maxFieldCount]; values = new FIXValue[maxFieldCount]; for (int i = 0; i < values.length; i++) values[i] = new FIXValue(fieldCapacity); count = 0; }
/** * Construct a new message container. * * @param maxFieldCount the maximum number of fields * @param fieldCapacity the field capacity */ public FIXMessage(int maxFieldCount, int fieldCapacity) { tags = new int[maxFieldCount]; values = new FIXValue[maxFieldCount]; for (int i = 0; i < values.length; i++) values[i] = new FIXValue(fieldCapacity); count = 0; }
/** * Create a message parser. * * @param config the parser configuration * @param listener the message listener */ public FIXMessageParser(FIXConfig config, FIXMessageListener listener) { this.message = new FIXMessage(config.getMaxFieldCount(), config.getFieldCapacity()); this.checkSumEnabled = config.isCheckSumEnabled(); this.listener = listener; this.beginString = new FIXValue(BEGIN_STRING_FIELD_CAPACITY); this.bodyLength = new FIXValue(BODY_LENGTH_FIELD_CAPACITY); this.checkSum = new FIXValue(CHECK_SUM_FIELD_CAPACITY); }
@Setup(Level.Iteration) public void prepare() { string = new StringBuilder(32); date = new MutableDateTime(2015, 9, 24, 0, 0, 0, 0); timeOnly = new MutableDateTime(2015, 9, 24, 9, 30, 5, 250); timestamp = new MutableDateTime(2015, 9, 24, 9, 30, 5, 250); booleanValue = new FIXValue(64); booleanValue.setBoolean(true); charValue = new FIXValue(64); charValue.setChar('Y'); intValue = new FIXValue(64); intValue.setInt(123); floatValue = new FIXValue(64); floatValue.setFloat(12.30, 2); stringValue = new FIXValue(64); stringValue.setString("FOO"); dateValue = new FIXValue(64); dateValue.setDate(date); timeOnlyValue = new FIXValue(64); timeOnlyValue.setTimeOnly(timeOnly, true); timestampValue = new FIXValue(64); timestampValue.setTimestamp(timestamp, true); copyValue = new FIXValue(64); }