Examples of CxfPublishHook


Examples of org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook

        context.registerService(ManagedService.class.getName(),
                                this, getDefaults());
       
        dpService = registerDistributionProviderService();

        pHook = new CxfPublishHook(context, dpService);
        lHook = new CxfListenerHook(context, dpService);
        context.registerService(ListenerHook.class.getName(), lHook, new Hashtable());       
        context.addServiceListener(this);                
        checkExistingServices();       
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook

        dswContext.registerService(serviceNames, serviceObject, serviceProps);
       
        final Server server = control.createMock(Server.class);       
        control.replay();

        CxfPublishHook hook = new CxfPublishHook(dswContext, null) {
            @Override
            Server createServer(ServiceReference sref, ServiceEndpointDescription sd) {
                return server;
            }           
        };
        assertNull("Precondition not met", hook.getEndpoints().get(sref));
        hook.publishEndpoint(sref);
        assertEquals(1, hook.getEndpoints().get(sref).size());

        hook.endpoints.put(sref, new ArrayList<EndpointInfo>());
        assertEquals("Precondition failed", 0, hook.getEndpoints().get(sref).size());       
        hook.publishEndpoint(sref);
        assertEquals(0, hook.getEndpoints().get(sref).size());
       
        control.verify();
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook

        decoratorReg = context.registerService(ServiceDecorator.class.getName(),
            new ServiceDecoratorImpl(context), null);
       
        dpService = registerDistributionProviderService();       

        pHook = new CxfPublishHook(context, dpService);       
        lHook = new CxfFindListenerHook(context, dpService);
        context.registerService(new String [] {FindHook.class.getName(), ListenerHook.class.getName()}, lHook, new Hashtable());
       
        context.addServiceListener(this);                
        checkExistingServices();       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.