airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject git commit: return type to message in consumer
Date Tue, 14 Oct 2014 15:22:03 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 6e1aa3ede -> 166ea5237


return type to message in consumer


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/166ea523
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/166ea523
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/166ea523

Branch: refs/heads/master
Commit: 166ea52373877b5253dc7362571c486539c20867
Parents: 6e1aa3e
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Oct 14 11:21:56 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Oct 14 11:21:56 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/messaging/core/Consumer.java    | 3 ++-
 .../org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/166ea523/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
index 17d18a5..6a42491 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/Consumer.java
@@ -22,11 +22,12 @@
 package org.apache.airavata.messaging.core;
 
 import org.apache.airavata.common.exception.AiravataException;
+import org.apache.airavata.model.messaging.event.Message;
 
 /**
  * This is the basic consumer
  */
 public interface Consumer {
-    public void listen (String routingKey) throws AiravataException;
+    public Message listen (String routingKey) throws AiravataException;
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/166ea523/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
index 402251e..ee0eb4a 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQConsumer.java
@@ -45,7 +45,7 @@ public class RabbitMQConsumer implements Consumer {
         this.url = brokerUrl;
     }
 
-    public void listen(String routingKey) throws AiravataException {
+    public Message listen(String routingKey) throws AiravataException {
         try {
             connection = createConnection();
             channel = connection.createChannel();
@@ -82,6 +82,7 @@ public class RabbitMQConsumer implements Consumer {
                     System.out.println(" Message Received with message id '" + message.getMessageId()
                             + "' and with message type '" + message.getMessageType() + "'
 with status " + jobStatusChangeEvent.getState());
                 }
+                return message;
             }
         } catch (Exception e) {
             reset();


Mime
View raw message