activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r383516 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Date Mon, 06 Mar 2006 11:18:31 GMT
Author: jstrachan
Date: Mon Mar  6 03:18:24 2006
New Revision: 383516

URL: http://svn.apache.org/viewcvs?rev=383516&view=rev
Log:
added helper method

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java?rev=383516&r1=383515&r2=383516&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Mon Mar  6 03:18:24 2006
@@ -80,4 +80,10 @@
     }
 
     protected abstract void doStop(ServiceStopper stopper) throws Exception;
+
+    protected void checkStarted() {
+        if (!isStarted()) {
+            throw new IllegalStateException("The transport " + this + " of type: " + getClass().getName()
+ " has not been started yet!");
+        }
+    }
 }



Mime
View raw message