Search in sources :

Example 6 with ClientLifeCycleManager

use of org.apache.cxf.endpoint.ClientLifeCycleManager in project cxf by apache.

the class OSGIBusListener method registerClientLifeCycleListeners.

private void registerClientLifeCycleListeners() {
    ServiceReference<?>[] refs = getServiceReferences(defaultContext, ClientLifeCycleListener.class);
    ClientLifeCycleManager clcm = bus.getExtension(ClientLifeCycleManager.class);
    for (ServiceReference<?> ref : refs) {
        if (!isPrivate(ref) && !isExcluded(ref)) {
            ClientLifeCycleListener listener = (ClientLifeCycleListener) defaultContext.getService(ref);
            clcm.registerListener(listener);
        }
    }
}
Also used : ClientLifeCycleListener(org.apache.cxf.endpoint.ClientLifeCycleListener) ClientLifeCycleManager(org.apache.cxf.endpoint.ClientLifeCycleManager) ServiceReference(org.osgi.framework.ServiceReference)

Aggregations

ClientLifeCycleManager (org.apache.cxf.endpoint.ClientLifeCycleManager)6 ClientLifeCycleListener (org.apache.cxf.endpoint.ClientLifeCycleListener)3 ServiceReference (org.osgi.framework.ServiceReference)2 Closeable (java.io.Closeable)1 IOException (java.io.IOException)1 PostConstruct (javax.annotation.PostConstruct)1 Bus (org.apache.cxf.Bus)1 ClientLifeCycleManagerImpl (org.apache.cxf.bus.managers.ClientLifeCycleManagerImpl)1 Client (org.apache.cxf.endpoint.Client)1 Server (org.apache.cxf.endpoint.Server)1 ServerLifeCycleListener (org.apache.cxf.endpoint.ServerLifeCycleListener)1 ServerLifeCycleManager (org.apache.cxf.endpoint.ServerLifeCycleManager)1 JAXRSClientFactoryBean (org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean)1 Book (org.apache.cxf.systest.jaxrs.Book)1 BookStore (org.apache.cxf.systest.jaxrs.BookStore)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1