activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r552736 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport: ./ failover/ fanout/ mock/ vm/
Date Tue, 03 Jul 2007 08:29:12 GMT
Author: rajdavies
Date: Tue Jul  3 01:29:11 2007
New Revision: 552736

URL: http://svn.apache.org/viewvc?view=rev&rev=552736
Log:
Added flag to transport to denote if its fault tolerant

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/Transport.java
Tue Jul  3 01:29:11 2007
@@ -125,5 +125,11 @@
      *  
      */
 	public String getRemoteAddress();
+    
+    /**
+     * Indicates if the transport can handle faults
+     * @return tru if fault tolerant
+     */
+    public boolean isFaultTolerant();
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportFilter.java
Tue Jul  3 01:29:11 2007
@@ -114,4 +114,12 @@
 	public String getRemoteAddress() {
 		return next.getRemoteAddress();
 	}
+
+    /**
+     * @return
+     * @see org.apache.activemq.transport.Transport#isFaultTolerant()
+     */
+    public boolean isFaultTolerant(){
+        return next.isFaultTolerant();
+    }
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportSupport.java
Tue Jul  3 01:29:11 2007
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 
+import org.apache.activemq.command.MessageDispatch;
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -102,6 +103,10 @@
         if (!isStarted()) {
 			throw new IOException("The transport is not running.");
         }
+    }
+    
+    public boolean isFaultTolerant(){
+        return false;
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Tue Jul  3 01:29:11 2007
@@ -545,5 +545,9 @@
 		}
 		return null;
 	}
+    
+    public boolean isFaultTolerant(){
+        return true;
+    }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Tue Jul  3 01:29:11 2007
@@ -539,4 +539,9 @@
             transportListener.onCommand(command);
         }
     }
+
+    
+    public boolean isFaultTolerant(){
+        return true;
+    }
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/mock/MockTransport.java
Tue Jul  3 01:29:11 2007
@@ -130,6 +130,13 @@
 
 	public String getRemoteAddress() {
 		return getNext().getRemoteAddress();
-	}  
+	}
+
+    /**
+     * @see org.apache.activemq.transport.Transport#isFaultTolerant()
+     */
+    public boolean isFaultTolerant(){
+       return getNext().isFaultTolerant();
+    }  
     
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java?view=diff&rev=552736&r1=552735&r2=552736
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
Tue Jul  3 01:29:11 2007
@@ -269,4 +269,8 @@
             }
         }
     }
+
+    public boolean isFaultTolerant(){
+        return false;
+    }
 }



Mime
View raw message