mirror of https://github.com/apache/activemq.git
refactored out a protected stopAllConnectors() so it can be overriden in derived classes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@466320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29459ed414
commit
319966c129
|
@ -432,26 +432,7 @@ public class BrokerService implements Service, Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
||||
NetworkConnector connector = (NetworkConnector) iter.next();
|
||||
unregisterNetworkConnectorMBean(connector);
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
|
||||
ProxyConnector connector = (ProxyConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
|
||||
JmsConnector connector = (JmsConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
|
||||
TransportConnector connector = (TransportConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
stopAllConnectors(stopper);
|
||||
|
||||
|
||||
//remove any VMTransports connected
|
||||
|
@ -488,6 +469,30 @@ public class BrokerService implements Service, Serializable {
|
|||
stopper.throwFirstException();
|
||||
}
|
||||
|
||||
protected void stopAllConnectors(ServiceStopper stopper) {
|
||||
|
||||
for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
|
||||
NetworkConnector connector = (NetworkConnector) iter.next();
|
||||
unregisterNetworkConnectorMBean(connector);
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
|
||||
ProxyConnector connector = (ProxyConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
|
||||
JmsConnector connector = (JmsConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
|
||||
for (Iterator iter = getTransportConnectors().iterator(); iter.hasNext();) {
|
||||
TransportConnector connector = (TransportConnector) iter.next();
|
||||
stopper.stop(connector);
|
||||
}
|
||||
}
|
||||
|
||||
// Properties
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue