Package quickfix

Examples of quickfix.Group


        message.setField(new Symbol(SYMBOL));
        message.setField(new ClOrdID(CLORD_ID));
        message.setField(new TradeOriginationDate(TX_DATE));

        Group g1 = new Group(NoAllocs.FIELD, AllocAccount.FIELD);
        g1.setField(new AllocAccount("ABC"));
        g1.setField(new IndividualAllocID("PQR"));
        message.addGroup(g1);
        Group g2 = new Group(NoAllocs.FIELD, AllocAccount.FIELD);
        g2.setField(new AllocAccount("MNO"));
        g2.setField(new IndividualAllocID("XYZ"));
        message.addGroup(g2);

        message.getTrailer().setField(new CheckSum(CHECKSUM));

        MessageContext msgCtx = new MessageContext();
View Full Code Here


                QuoteType.FIELD, OrderQty.FIELD, SettlDate.FIELD, QuotePriceType.FIELD,
                ValidUntilTime.FIELD, ExpireTime.FIELD
        };

        Message message = new QuoteRequest(new QuoteReqID("20101110-2"));
        Group group = new Group(NoRelatedSym.FIELD, Symbol.FIELD, order);
        group.setField(new Symbol("TestSymbol"));
        group.setField(new SecurityID("SecurityID"));
        group.setField(new SecurityIDSource("SecurityIDSource"));
        group.setField(new Product(11));
        group.setField(new QuoteType(1));
        group.setField(new OrderQty(500));
        group.setField(new SettlDate("20151116"));
        group.setField(new QuotePriceType(1));
        group.setField(new ValidUntilTime(new Date()));
        group.setField(new ExpireTime(new Date()));
        message.addGroup(group);
        System.out.println("Original Message: " + message);

        MessageContext msgCtx = new MessageContext();
        FIXUtils.getInstance().setSOAPEnvelope(message, 1, "TestSession", msgCtx);
        OMElement msgElt = msgCtx.getEnvelope().getBody().getFirstElement();
        OMElement groupsElt = msgElt.getFirstChildWithName(new QName(FIXConstants.FIX_BODY)).
                getFirstChildWithName(new QName(FIXConstants.FIX_GROUPS));

        int groupId = Integer.parseInt(groupsElt.getAttributeValue(
                new QName(FIXConstants.FIX_FIELD_ID)));
        assertEquals(groupId, group.getFieldTag());

        // Test whether the fileds in the SOAP infoset are in the correct order
        Iterator fields = groupsElt.getFirstElement().getChildrenWithName(
                new QName(FIXConstants.FIX_FIELD));
        List<Integer> fieldList = new ArrayList<Integer>();
View Full Code Here

      rowDef.tag = groupCountTag;
      rowDef.fieldName = prefix + ((dd.getFieldName(groupCountTag) == null) ? "" : dd.getFieldName(groupCountTag));
      rowDef.fieldValue = Integer.toString(fieldMap.getGroupCount(groupCountTag));
      rows.add(rowDef);

      Group g = new Group(groupCountTag, 0);
      int i = 1;
      while (fieldMap.hasGroup(i, groupCountTag)) {
        try {
          fieldMap.getGroup(i, g);
          processFieldMap(prefix + "  ", dd, msgType, g);
View Full Code Here

      }
      lineWriter.append(dd.getFieldName(groupCountTag)).append("<").append(Integer.toString(groupCountTag)).append(">=").append(Integer.toString(groupCount));

      // System.out.println(prefix + dd.getFieldName(groupCountTag) +
      // ": count = " + fieldMap.getInt(groupCountTag));
      Group g = new Group(groupCountTag, 0);
      int i = 1;
      while (fieldMap.hasGroup(i, groupCountTag)) {
        fieldMap.getGroup(i, g);
        lineWriter = processFieldMap(writer, lineWriter, dd, msgType, g);
        i++;
View Full Code Here

    String symbol = message.getSymbol().getValue();
    tickerBuilder.currencyPair(BTCChinaAdapters.adaptCurrencyPair(symbol));

    int noMDEntries = message.getNoMDEntries().getValue();
    for (int i = 1; i <= noMDEntries; i++) {
      Group group = message.getGroup(i, NoMDEntries.FIELD);
      adapt(tickerBuilder, group);
    }

    Ticker ticker = tickerBuilder.build();
    return ticker;
View Full Code Here

        new Ticker.Builder().currencyPair(ticker.getCurrencyPair()).timestamp(ticker.getTimestamp()).bid(ticker.getBid()).ask(ticker.getAsk()).last(ticker.getLast())
            .high(ticker.getHigh()).low(ticker.getLow()).volume(ticker.getVolume());

    int noMDEntries = message.getNoMDEntries().getValue();
    for (int i = 1; i <= noMDEntries; i++) {
      Group group = message.getGroup(i, NoMDEntries.FIELD);
      adapt(tickerBuilder, group);
    }

    return tickerBuilder.build();
  }
View Full Code Here

        Iterator<Integer> groupsKeys = fieldMap.groupKeyIterator();
        while (groupsKeys.hasNext()) {
            int groupCountTag = ((Integer) groupsKeys.next()).intValue();
            sb.append(prefix + dd.getFieldName(groupCountTag)
                + ": count = " + fieldMap.getInt(groupCountTag) + "\n");
            Group g = new Group(groupCountTag, 0);
            int i = 1;
            while (fieldMap.hasGroup(i, groupCountTag)) {
                if (i > 1) {
                    sb.append(prefix + "  ----\n");
                }
View Full Code Here

        Iterator<Integer> groupsKeys = fieldMap.groupKeyIterator();
        while (groupsKeys.hasNext()) {
            int groupCountTag = ((Integer) groupsKeys.next()).intValue();
            sb.append(prefix + dd.getFieldName(groupCountTag)
                + ": count = " + fieldMap.getInt(groupCountTag) + "\n");
            Group g = new Group(groupCountTag, 0);
            int i = 1;
            while (fieldMap.hasGroup(i, groupCountTag)) {
                if (i > 1) {
                    sb.append(prefix + "  ----\n");
                }
View Full Code Here

        final DataDictionary.GroupInfo groupInfo = dictionary.getGroup(
                    messageTypeValue, field.getTag());
        if (groupInfo != null) {

            int delimeterField = groupInfo.getDelimeterField();
            Group group = new Group(field.getTag(), delimeterField);
            int numberOfGroups =  Integer.valueOf((String) field.getObject());
            for (int index = 0; index < numberOfGroups; index++) {
                LogGroup logGroup =
                        new LogGroup(messageType, field, dictionary);

                try {

                    message.getGroup(index + 1, group);

                    Iterator groupIterator = group.iterator();
                    while (groupIterator.hasNext()) {
                        Field groupField = (Field) groupIterator.next();
                        logGroup.addField(LogField.createLogField(messageType,
                                groupField, dictionary));
View Full Code Here

TOP

Related Classes of quickfix.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.