added helper method

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-06 11:18:24 +00:00
parent 6cb66e4865
commit 204e940809
1 changed files with 6 additions and 0 deletions

View File

@ -80,4 +80,10 @@ public abstract class TransportThreadSupport extends TransportSupport implements
} }
protected abstract void doStop(ServiceStopper stopper) throws Exception; 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!");
}
}
} }