You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by th...@apache.org on 2010/09/08 17:20:06 UTC

svn commit: r995088 - in /incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing: MulticastServiceFinder.java ServiceWrapper.java

Author: thobbs
Date: Wed Sep  8 15:20:06 2010
New Revision: 995088

URL: http://svn.apache.org/viewvc?rev=995088&view=rev
Log:
Tidied up the code a bit, Javadocs come next.

Modified:
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java
    incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java

Modified: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java?rev=995088&r1=995087&r2=995088&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java (original)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/MulticastServiceFinder.java Wed Sep  8 15:20:06 2010
@@ -18,6 +18,8 @@ public class MulticastServiceFinder impl
 
     private static final Logger logger = Logger.getLogger(MulticastServiceFinder.class.getSimpleName());
 
+    private static final long SETTLE_DOWN_WAIT_TIME = 500;
+
     private final ServiceDiscoveryManager serviceDiscovery;
 
     public MulticastServiceFinder() throws IOException {
@@ -25,13 +27,13 @@ public class MulticastServiceFinder impl
     }
 
     public MulticastServiceFinder(final DiscoveryListenerManagement dlm) throws IOException {
-        this((DiscoveryManagement) dlm, new LeaseRenewalManager());
+        this(dlm, new LeaseRenewalManager());
     }
 
-    public MulticastServiceFinder(final DiscoveryManagement dlm, final LeaseRenewalManager lrm) throws IOException {
-        this.serviceDiscovery = new ServiceDiscoveryManager(dlm, lrm);
+    public MulticastServiceFinder(final DiscoveryListenerManagement dlm, final LeaseRenewalManager lrm) throws IOException {
+        this.serviceDiscovery = new ServiceDiscoveryManager((DiscoveryManagement)dlm, lrm);
         try {
-            Thread.sleep(2000);
+            Thread.sleep(SETTLE_DOWN_WAIT_TIME);
         } catch (InterruptedException ie) {}
     }
 

Modified: incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java?rev=995088&r1=995087&r2=995088&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java (original)
+++ incubator/river/jtsk/skunk/Extra_SelfHealingProxy/src/org/apache/river/extra/selfhealing/ServiceWrapper.java Wed Sep  8 15:20:06 2010
@@ -51,9 +51,7 @@ public class ServiceWrapper implements I
 
     protected Object execute(final Method method, final Object[] args) throws RemoteException {
         try {
-
-            System.out.println("Invoking method "+method.getName()+" on object "+this.proxy);
-
+            logger.finest("Invoking method ["+method+"] on "+this.proxy);
             return method.invoke(this.proxy, args);
         } catch (IllegalAccessException iae) {
             throw new RemoteException("Cannot execute method because "+iae.getMessage(), iae);