mirror of https://github.com/apache/activemq.git
minor refactor to make it easier to override starting
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
534ea690ff
commit
8568d6ee05
|
@ -50,11 +50,7 @@ public abstract class TransportServerThreadSupport extends TransportServerSuppor
|
|||
|
||||
public void start() throws Exception {
|
||||
if (started.compareAndSet(false, true)) {
|
||||
log.info("Listening for connections at: " + getLocation());
|
||||
runner = new Thread(this, toString());
|
||||
runner.setDaemon(daemon);
|
||||
runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
|
||||
runner.start();
|
||||
doStart();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,5 +113,13 @@ public abstract class TransportServerThreadSupport extends TransportServerSuppor
|
|||
this.joinOnStop = joinOnStop;
|
||||
}
|
||||
|
||||
protected void doStart() {
|
||||
log.info("Listening for connections at: " + getLocation());
|
||||
runner = new Thread(this, toString());
|
||||
runner.setDaemon(daemon);
|
||||
runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
|
||||
runner.start();
|
||||
}
|
||||
|
||||
protected abstract void doStop(ServiceStopper stopper) throws Exception;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue