public static void shutdownBus() { synchronized (LOG) { if (bus != null) { bus.shutdown(true); BusFactory.clearDefaultBusForAnyThread(bus); bus = null; } } }
public void shutdown(boolean wait) { if (state == BusState.SHUTTING_DOWN) { return; } BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class); if (null != lifeCycleManager) { lifeCycleManager.preShutdown(); } synchronized (this) { state = BusState.SHUTTING_DOWN; } destroyBeans(); synchronized (this) { state = BusState.SHUTDOWN; notifyAll(); } if (null != lifeCycleManager) { lifeCycleManager.postShutdown(); } if (BusFactory.getDefaultBus(false) == this) { BusFactory.setDefaultBus(null); } BusFactory.clearDefaultBusForAnyThread(this); }
public void shutdown(boolean wait) { if (state == BusState.SHUTTING_DOWN) { return; } BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class); if (null != lifeCycleManager) { lifeCycleManager.preShutdown(); } synchronized (this) { state = BusState.SHUTTING_DOWN; } destroyBeans(); synchronized (this) { state = BusState.SHUTDOWN; notifyAll(); } if (null != lifeCycleManager) { lifeCycleManager.postShutdown(); } if (BusFactory.getDefaultBus(false) == this) { BusFactory.setDefaultBus(null); } BusFactory.clearDefaultBusForAnyThread(this); }
public void shutdown(boolean wait) { if (state == BusState.SHUTTING_DOWN) { return; } BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class); if (null != lifeCycleManager) { lifeCycleManager.preShutdown(); } synchronized (this) { state = BusState.SHUTTING_DOWN; } destroyBeans(); synchronized (this) { state = BusState.SHUTDOWN; notifyAll(); } if (null != lifeCycleManager) { lifeCycleManager.postShutdown(); } if (BusFactory.getDefaultBus(false) == this) { BusFactory.setDefaultBus(null); } BusFactory.clearDefaultBusForAnyThread(this); }
public void shutdown(boolean wait) { if (state == BusState.SHUTTING_DOWN) { return; } BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class); if (null != lifeCycleManager) { lifeCycleManager.preShutdown(); } synchronized (this) { state = BusState.SHUTTING_DOWN; } destroyBeans(); synchronized (this) { state = BusState.SHUTDOWN; notifyAll(); } if (null != lifeCycleManager) { lifeCycleManager.postShutdown(); } if (BusFactory.getDefaultBus(false) == this) { BusFactory.setDefaultBus(null); } BusFactory.clearDefaultBusForAnyThread(this); }