airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1352655 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor: Monitor.java WsmgClient.java
Date Thu, 21 Jun 2012 19:15:55 GMT
Author: lahiru
Date: Thu Jun 21 19:15:54 2012
New Revision: 1352655

URL: http://svn.apache.org/viewvc?rev=1352655&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-284.

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/Monitor.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/Monitor.java?rev=1352655&r1=1352654&r2=1352655&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/Monitor.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/Monitor.java
Thu Jun 21 19:15:54 2012
@@ -188,6 +188,7 @@ public class Monitor extends EventProduc
 
     private void subscribe() throws MonitorException {
         this.wsmgClient = new WsmgClient(this);
+        //Users can set the timeout and interval for the subscription using wsmg setter methods,
here we use the default values
         this.wsmgClient.subscribe();
 
         // Enable/disable some menu items and show the monitor panel.

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java?rev=1352655&r1=1352654&r2=1352655&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/monitor/WsmgClient.java
Thu Jun 21 19:15:54 2012
@@ -56,6 +56,9 @@ public class WsmgClient implements Consu
 
     private MessagePuller messagePuller;
 
+    private long timeout = 20000L;
+
+    private long interval = 1000L;
     /**
      * Constructs a WsmgClient.
      * 
@@ -85,7 +88,7 @@ public class WsmgClient implements Consu
             if (this.pullMode) {
                 EndpointReference messageBoxEPR = this.wseClient.createPullMsgBox(this.messageBoxURL.toString());
                 this.subscriptionID = this.wseClient.subscribe(messageBoxEPR.getAddress(),
this.topic, null);
-                this.messagePuller = this.wseClient.startPullingEventsFromMsgBox(messageBoxEPR,
this, 1000L, 20000L);
+                this.messagePuller = this.wseClient.startPullingEventsFromMsgBox(messageBoxEPR,
this, interval, timeout);
             } else {
                 String[] endpoints = this.wseClient.startConsumerService(2222, this);
                 this.subscriptionID = this.wseClient.subscribe(endpoints[0], this.topic,
null);
@@ -144,4 +147,19 @@ public class WsmgClient implements Consu
         }
     }
 
+    public long getTimeout() {
+        return timeout;
+    }
+
+    public void setTimeout(long timeout) {
+        this.timeout = timeout;
+    }
+
+    public long getInterval() {
+        return interval;
+    }
+
+    public void setInterval(long interval) {
+        this.interval = interval;
+    }
 }
\ No newline at end of file



Mime
View raw message