Package com.bloomberglp.blpapi

Examples of com.bloomberglp.blpapi.Message.asElement()


      while (msgIter.hasNext()) {
        Message msg = msgIter.next();
        String bbgUniqueId = msg.topicName();

        if (event.eventType() == Event.EventType.SUBSCRIPTION_DATA) {
          FudgeMsg eventAsFudgeMsg = BloombergDataUtils.parseElement(msg.asElement());
          liveDataReceived(bbgUniqueId, eventAsFudgeMsg);
          // REVIEW 2012-09-19 Andrew -- Why return? Might the event contain multiple messages?
          return;
        }
        s_logger.info("Got event {} {} {}", event.eventType(), bbgUniqueId, msg.asElement());
View Full Code Here


          FudgeMsg eventAsFudgeMsg = BloombergDataUtils.parseElement(msg.asElement());
          liveDataReceived(bbgUniqueId, eventAsFudgeMsg);
          // REVIEW 2012-09-19 Andrew -- Why return? Might the event contain multiple messages?
          return;
        }
        s_logger.info("Got event {} {} {}", event.eventType(), bbgUniqueId, msg.asElement());

        if (event.eventType() == Event.EventType.SESSION_STATUS) {
          s_logger.info("SESSION_STATUS event received: {}", msg.messageType());
          if (msg.messageType().toString().equals("SessionTerminated")) {
            disconnect();
View Full Code Here

            return;
          }
        }
       
        CorrelationID bbgCID = msg.correlationID();
        Element element = msg.asElement();
        getLogger().debug("got msg with cid={} msg.asElement={}", bbgCID, msg.asElement());
        if (bbgCID != null) {
          realCID = _correlationIDMap.get(bbgCID);
          if (realCID != null) {
            BlockingQueue<Element> messages = _correlationIDElementMap.get(realCID);
View Full Code Here

          }
        }
       
        CorrelationID bbgCID = msg.correlationID();
        Element element = msg.asElement();
        getLogger().debug("got msg with cid={} msg.asElement={}", bbgCID, msg.asElement());
        if (bbgCID != null) {
          realCID = _correlationIDMap.get(bbgCID);
          if (realCID != null) {
            BlockingQueue<Element> messages = _correlationIDElementMap.get(realCID);
            if (messages == null) {
View Full Code Here

          MutableFudgeMsg tickMsg = s_fudgeContext.newMessage();
          Instant instant = Clock.systemUTC().instant();
          long epochMillis = instant.toEpochMilli();
          tickMsg.add(RECEIVED_TS_KEY, epochMillis);
          tickMsg.add(SECURITY_KEY, securityDes);
          tickMsg.add(FIELDS_KEY, BloombergDataUtils.parseElement(msg.asElement()));
          s_logger.debug("{}: {} - {}", new Object[]{_dateFormat
              .format(Calendar.getInstance().getTime()), securityDes, msg.messageType()});
          s_logger.debug("{}", msg.asElement());
          _allTicksQueue.put(tickMsg);
          s_logger.debug("singleQueueSize {}", _allTicksQueue.size());
View Full Code Here

          tickMsg.add(RECEIVED_TS_KEY, epochMillis);
          tickMsg.add(SECURITY_KEY, securityDes);
          tickMsg.add(FIELDS_KEY, BloombergDataUtils.parseElement(msg.asElement()));
          s_logger.debug("{}: {} - {}", new Object[]{_dateFormat
              .format(Calendar.getInstance().getTime()), securityDes, msg.messageType()});
          s_logger.debug("{}", msg.asElement());
          _allTicksQueue.put(tickMsg);
          s_logger.debug("singleQueueSize {}", _allTicksQueue.size());
        }
      }
    } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.