public synchronized void setEnabled(boolean e) { enabled = e; if (enabled && !addedBusInterceptors) { addBusInterceptors(); } else if (!enabled && addedBusInterceptors) { removeBusInterceptors(); } }
public synchronized void setEnabled(boolean e) { enabled = e; if (enabled && !addedBusInterceptors) { addBusInterceptors(); } else if (!enabled && addedBusInterceptors) { removeBusInterceptors(); } }
@Resource public final void setBus(Bus b) { if (this.bus == b) { //avoid bus init twice through injection return; } bus = b; addBusInterceptors(); FactoryBeanListenerManager fblm = bus.getExtension(FactoryBeanListenerManager.class); if (fblm != null) { for (FactoryBeanListener l : fblm.getListeners()) { if (l instanceof PolicyAnnotationListener) { return; } } fblm.addListener(new PolicyAnnotationListener(bus)); } }
@Resource public final void setBus(Bus b) { if (this.bus == b) { //avoid bus init twice through injection return; } bus = b; addBusInterceptors(); FactoryBeanListenerManager fblm = bus.getExtension(FactoryBeanListenerManager.class); if (fblm != null) { for (FactoryBeanListener l : fblm.getListeners()) { if (l instanceof PolicyAnnotationListener) { return; } } fblm.addListener(new PolicyAnnotationListener(bus)); } }