Package org.apache.cxf.bus

Examples of org.apache.cxf.bus.CXFBusImpl


    }
   
    @Test
    public void testGetMultiple() throws Exception {
        transportFactory = new JettyHTTPTransportFactory();
        transportFactory.setBus(new CXFBusImpl());
       
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));       
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
View Full Code Here


       
    }

    @Test
    public void testDoService() throws Exception {
        Bus defaultBus = new CXFBusImpl();
        assertSame("Default thread bus has not been set",
                   defaultBus, BusFactory.getThreadDefaultBus());
        destination = setUpDestination(false, false);
        setUpDoService(false);
        assertSame("Default thread bus has been unexpectedly reset",
View Full Code Here

    @Test
    public void testServerPolicyInServiceModel()
        throws Exception {
        policy = new HTTPServerPolicy();
        address = getEPR("bar/foo");
        bus = new CXFBusImpl();
       
        transportFactory = new JettyHTTPTransportFactory();
        transportFactory.setBus(bus);
       
        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here

                return decoupledBackChannel;
            }
        };
       
        if (!mockedBus) {
            bus = new CXFBusImpl();
        } else {
            bus = EasyMock.createMock(Bus.class);
            bus.getExtension(EndpointResolverRegistry.class);
            EasyMock.expectLastCall().andReturn(null);
            bus.getExtension(PolicyEngine.class);
View Full Code Here

        if (bus instanceof CXFBusImpl) {
            final ServiceConfiguration configuration = new ServiceConfiguration(SystemInstance.get().getProperties(),
                SystemInstance.get().getComponent(OpenEjbConfiguration.class).facilities.services);

            final CXFBusImpl busImpl = (CXFBusImpl) bus;
            final Collection<ServiceInfo> serviceInfos = configuration.getAvailableServices();
            final Properties properties = configuration.getProperties();
            if (properties == null || properties.isEmpty()) {
                return;
            }

            final String featuresIds = properties.getProperty(BUS_PREFIX + FEATURES);
            if (featuresIds != null) {
                final List<AbstractFeature> features = createFeatures(serviceInfos, featuresIds);
                if (features != null) {
                    features.addAll(busImpl.getFeatures());
                    busImpl.setFeatures(features);
                }
            }

            final Properties busProperties = ServiceInfos.serviceProperties(serviceInfos, properties.getProperty(BUS_PREFIX + ENDPOINT_PROPERTIES));
            if (busProperties != null) {
                busImpl.getProperties().putAll(PropertiesHelper.map(busProperties));
            }

            configureInterceptors(busImpl, BUS_PREFIX, serviceInfos, configuration.getProperties());

            SystemInstance.get().getProperties().setProperty(BUS_CONFIGURED_FLAG, "true");

            busImpl.setId(SystemInstance.get().getProperty("openejb.cxf.bus.id", "openejb.cxf.bus"));
        }
    }
View Full Code Here

        assertNotNull(engine.getRegistry());
        assertNull(engine.getBus());
        assertNull(engine.getPolicyProviders());
        assertNull(engine.getAlternativeSelector());
        assertTrue(!engine.isEnabled());
        Bus bus = new CXFBusImpl();
       
        engine.setBus(bus);
        List<PolicyProvider> providers = CastUtils.cast(Collections.EMPTY_LIST, PolicyProvider.class);
        engine.setPolicyProviders(providers);
        PolicyRegistry reg = control.createMock(PolicyRegistry.class);
View Full Code Here

    }
   
    @Test
    public void testRandomPortAllocation() throws Exception {
        transportFactory = new JettyHTTPTransportFactory();
        transportFactory.setBus(new CXFBusImpl());
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
       
View Full Code Here

    }
   
    @Test
    public void testGetMultiple() throws Exception {
        transportFactory = new JettyHTTPTransportFactory();
        transportFactory.setBus(new CXFBusImpl());
       
        ServiceInfo serviceInfo = new ServiceInfo();
        serviceInfo.setName(new QName("bla", "Service"));       
        EndpointInfo ei = new EndpointInfo(serviceInfo, "");
        ei.setName(new QName("bla", "Port"));
View Full Code Here

       
    }

    @Test
    public void testDoService() throws Exception {
        Bus defaultBus = new CXFBusImpl();
        assertSame("Default thread bus has not been set",
                   defaultBus, BusFactory.getThreadDefaultBus());
        destination = setUpDestination(false, false);
        setUpDoService(false);
        assertSame("Default thread bus has been unexpectedly reset",
View Full Code Here

    @Test
    public void testServerPolicyInServiceModel()
        throws Exception {
        policy = new HTTPServerPolicy();
        address = getEPR("bar/foo");
        bus = new CXFBusImpl();
       
        transportFactory = new JettyHTTPTransportFactory();
        transportFactory.setBus(bus);
       
        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here

TOP

Related Classes of org.apache.cxf.bus.CXFBusImpl

Copyright © 2018 www.massapicom. 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.