Search in sources :

Example 1 with BusCreationListener

use of org.apache.cxf.buslifecycle.BusCreationListener in project cxf by apache.

the class ExtensionManagerBus method initialize.

public void initialize() {
    setState(BusState.INITIALIZING);
    Collection<? extends BusCreationListener> ls = getExtension(ConfiguredBeanLocator.class).getBeansOfType(BusCreationListener.class);
    for (BusCreationListener l : ls) {
        l.busCreated(this);
    }
    doInitializeInternal();
    BusLifeCycleManager lifeCycleManager = this.getExtension(BusLifeCycleManager.class);
    if (null != lifeCycleManager) {
        lifeCycleManager.initComplete();
    }
    setState(BusState.RUNNING);
}
Also used : BusCreationListener(org.apache.cxf.buslifecycle.BusCreationListener) ConfiguredBeanLocator(org.apache.cxf.configuration.ConfiguredBeanLocator) BusLifeCycleManager(org.apache.cxf.buslifecycle.BusLifeCycleManager)

Example 2 with BusCreationListener

use of org.apache.cxf.buslifecycle.BusCreationListener in project cxf by apache.

the class OSGIBusListener method sendBusCreatedToBusCreationListeners.

private void sendBusCreatedToBusCreationListeners() {
    ServiceReference<?>[] refs = getServiceReferences(defaultContext, BusCreationListener.class);
    for (ServiceReference<?> ref : refs) {
        if (!isPrivate(ref) && !isExcluded(ref)) {
            BusCreationListener listener = (BusCreationListener) defaultContext.getService(ref);
            listener.busCreated(bus);
        }
    }
}
Also used : BusCreationListener(org.apache.cxf.buslifecycle.BusCreationListener) ServiceReference(org.osgi.framework.ServiceReference)

Aggregations

BusCreationListener (org.apache.cxf.buslifecycle.BusCreationListener)2 BusLifeCycleManager (org.apache.cxf.buslifecycle.BusLifeCycleManager)1 ConfiguredBeanLocator (org.apache.cxf.configuration.ConfiguredBeanLocator)1 ServiceReference (org.osgi.framework.ServiceReference)1