Package org.apache.ivory.messaging

Examples of org.apache.ivory.messaging.EntityInstanceMessage


    Destination destination = session.createTopic(TOPIC_NAME);
    javax.jms.MessageProducer producer = session
        .createProducer(destination);
    producer.setDeliveryMode(DeliveryMode.PERSISTENT);
    for (int i = 0; i < 10; i++) {
      EntityInstanceMessage ivoryMessage = getMockIvoryMessage(i);
      MapMessage message = session.createMapMessage();
      for (ARG arg : ARG.values()) {
        message.setString(arg.getPropName(), ivoryMessage
            .getKeyValueMap().get(arg));
      }
      Log.debug("Sending:" + message);
      producer.send(message);
    }

    EntityInstanceMessage message = getMockIvoryMessage(15);
    message.getKeyValueMap().put(ARG.status, "FAILED");
    TextMessage textMessage = session.createTextMessage(message.toString());
    producer.send(textMessage);

  }
View Full Code Here


    producer.send(textMessage);

  }

  private EntityInstanceMessage getMockIvoryMessage(int i) {
    EntityInstanceMessage message = new EntityInstanceMessage();
    message.getKeyValueMap().put(ARG.brokerImplClass, BROKER_IMPL_CLASS);
    message.getKeyValueMap().put(ARG.brokerUrl, BROKER_URL);
    message.getKeyValueMap().put(ARG.entityName, "process1");
    message.getKeyValueMap().put(ARG.entityType, "PROCESS");
    message.getKeyValueMap().put(ARG.feedInstancePaths,
        "/clicks/hour/00/0" + i);
    message.getKeyValueMap().put(ARG.feedNames, "clicks");
    message.getKeyValueMap().put(ARG.logFile, "/logfile");
    message.getKeyValueMap().put(ARG.nominalTime, "2012-10-10-10-10");
    message.getKeyValueMap().put(ARG.operation, "GENERATE");
    message.getKeyValueMap().put(ARG.runId, "0");
    message.getKeyValueMap().put(ARG.timeStamp, "2012-10-10-10-1" + i);
    message.getKeyValueMap().put(ARG.workflowId, "workflow-" + i);
    message.getKeyValueMap().put(ARG.topicName, TOPIC_NAME);
    message.getKeyValueMap().put(ARG.status, "SUCCEEDED");
    return message;
  }
View Full Code Here

TOP

Related Classes of org.apache.ivory.messaging.EntityInstanceMessage

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.