Package com.bloomberglp.blpapi

Examples of com.bloomberglp.blpapi.MessageIterator


        Thread.interrupted();
      }
      if (event == null) {
        return;
      }
      MessageIterator msgIter = event.messageIterator();
      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);
View Full Code Here


      if (event == null) {
        //getLogger().debug("Got NULL event");
        return;
      }
      //getLogger().debug("Got event of type {}", event.eventType());
      MessageIterator msgIter = event.messageIterator();
      CorrelationID realCID = null;
      while (msgIter.hasNext()) {
        Message msg = msgIter.next();
        if (event.eventType() == Event.EventType.SESSION_STATUS) {
          if (msg.messageType().toString().equals("SessionTerminated")) {
            getLogger().error("Session terminated");
            terminate();
            return;
View Full Code Here

    }
  }

  private void processSubscriptionStatus(Event event, Session session) throws Exception {
    s_logger.debug("Processing SUBSCRIPTION_STATUS");
    MessageIterator msgIter = event.messageIterator();
    while (msgIter.hasNext()) {
      Message msg = msgIter.next();
      String topic = (String) msg.correlationID().object();
      s_logger.debug("{}: {} - {}", new Object[]{_dateFormat
          .format(Calendar.getInstance().getTime()), topic, msg.messageType()});
      if (msg.messageType().equals("SubscriptionTerminated")) {
        s_logger.warn("SubscriptionTerminated for {}", msg.correlationID().object());
View Full Code Here

  }

  private void processSubscriptionDataEvent(Event event, Session session) throws Exception {
    s_logger.debug("Processing SUBSCRIPTION_DATA");
    if (tickWriterIsAlive()) {
      MessageIterator msgIter = event.messageIterator();
      while (msgIter.hasNext()) {
        Message msg = msgIter.next();
        if (isValidMessage(msg)) {
          String securityDes = (String) msg.correlationID().object();
          MutableFudgeMsg tickMsg = s_fudgeContext.newMessage();
          Instant instant = Clock.systemUTC().instant();
          long epochMillis = instant.toEpochMilli();
View Full Code Here

    return _ticksCollector.isTickWriterAlive();
  }

  private void processMiscEvents(Event event, Session session) throws Exception {
    s_logger.info("Processing {}", event.eventType());
    MessageIterator msgIter = event.messageIterator();
    while (msgIter.hasNext()) {
      Message msg = msgIter.next();
      s_logger.debug("{}: {}\n", _dateFormat
          .format(Calendar.getInstance().getTime()), msg.messageType());
    }
  }
View Full Code Here

TOP

Related Classes of com.bloomberglp.blpapi.MessageIterator

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.