Examples of CxfDistributionProvider


Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        EasyMock.replay(bc);
       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.POJO_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        // use default for this: sdProps.put(Constants.CONFIG_TYPE_PROPERTY, Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.POJO_ADDRESS_PROPERTY, "http://localhost:9876/abcd");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        sdProps.put("osgi.remote.configuration.type", Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.POJO_HTTP_SERVICE_CONTEXT, "/abc");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof HttpServiceConfigurationTypeHandler);
        assertSame(dp, ((HttpServiceConfigurationTypeHandler) handler).getDistributionProvider());               
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.WSDL_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof WsdlConfigurationTypeHandler);       
        assertSame(dp, ((WsdlConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

    }

    @Test
    public void testConstructorAndGetters() {
        BundleContext bc = control.createMock(BundleContext.class);
        CxfDistributionProvider dp = control.createMock(CxfDistributionProvider.class);
        control.replay();
       
        CxfListenerHook clh = new CxfListenerHook(bc, dp);
        assertSame(bc, clh.getContext());
        assertSame(dp, clh.getDistributionProvider());
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

       
        assertNull("Precondition failed", a.dpService);
        a.start(bc);
        assertNotNull(a.dpService);
       
        CxfDistributionProvider mockDP = EasyMock.createMock(CxfDistributionProvider.class);
        mockDP.shutdown();
        EasyMock.replay(mockDP);
        a.dpService = mockDP;
        a.stop(bc);
        EasyMock.verify(mockDP);
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

       
        assertEquals("Precondition failed", 0, services.size());
        a.start(bc);
       
        assertEquals(4, services.size());
        CxfDistributionProvider dp = null;
        for (Object o : services.keySet()) {
            if (o instanceof CxfDistributionProvider) {
                dp = ((CxfDistributionProvider) o);
            }
        }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        EasyMock.replay(bc);
       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.service.CxfDistributionProvider

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.EXPORTED_CONFIGS, Constants.RS_CONFIG_TYPE);
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof JaxRSPojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
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.