Package org.apache.cxf.bus

Examples of org.apache.cxf.bus.CXFBusImpl


     * over a Basic Auth Supplier with preemptive UserPass, and that
     * followed by setting it directly on the Conduit.
     */
    @Test
    public void testAuthPolicyPrecidence() throws Exception {
        Bus bus = new CXFBusImpl();
        EndpointInfo ei = new EndpointInfo();
        ei.setAddress("http://nowhere.com/bar/foo");
        HTTPConduit conduit = new HTTPConduit(bus, ei, null);
        conduit.finalizeConfig();

View Full Code Here


            "org.apache.camel.component.cxf.HelloService");
    }
   
    @Test
    public void testSettingClientBus() throws Exception {
        CXFBusImpl bus = (CXFBusImpl) BusFactory.newInstance().createBus();
        bus.setId("oldCXF");
        BusFactory.setThreadDefaultBus(bus);
       
        CXFBusImpl newBus = (CXFBusImpl) BusFactory.newInstance().createBus();
        newBus.setId("newCXF");
        CxfComponent cxfComponent = new CxfComponent(new DefaultCamelContext());
        CxfEndpoint endpoint = (CxfEndpoint)cxfComponent.createEndpoint(routerEndpointURI);
        endpoint.setBus(newBus);
        CamelCxfClientImpl client = (CamelCxfClientImpl)endpoint.createClient();
        assertEquals("CamelCxfClientImpl should has the same bus with CxfEndpoint", newBus, client.getBus());
View Full Code Here

            public JettyHTTPServerEngine retrieveJettyHTTPServerEngine(int port) {
                return httpEngine;
            }
        };
        transportFactory = new HTTPTransportFactory();
        transportFactory.setBus(new CXFBusImpl());
        transportFactory.getBus().setExtension(
            factory, JettyHTTPServerEngineFactory.class);
       
        TestJettyDestination testDestination =
            new TestJettyDestination(transportFactory.getBus(),
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 HTTPTransportFactory();
        transportFactory.setBus(bus);
       
        ServiceInfo serviceInfo = new ServiceInfo();
View Full Code Here

            public void registerConduitInitiator(String name, ConduitInitiator factory) {
            }
        };
       
        if (!mockedBus) {
            bus = new CXFBusImpl();
            bus.setExtension(mgr, ConduitInitiatorManager.class);
        } else {
            bus = EasyMock.createMock(Bus.class);
            bus.getExtension(EndpointResolverRegistry.class);
            EasyMock.expectLastCall().andReturn(null);
View Full Code Here

            connection.setUseCaches(false);
            EasyMock.expectLastCall();
           
        }

        CXFBusImpl bus = new CXFBusImpl();
       
        control.replay();
       
        HTTPConduit conduit = new HTTPTestConduit(bus,
                                              endpointInfo,
View Full Code Here

            connection.setUseCaches(false);
            EasyMock.expectLastCall();
           
        }

        CXFBusImpl bus = new CXFBusImpl();
       
        control.replay();
       
        HTTPConduit conduit = new HTTPTestConduit(bus,
                                              endpointInfo,
View Full Code Here

        public BusConfig(String busName) {
            this.busName = busName;
        }
       
        public void setBus(Bus bb) {
            CXFBusImpl b = (CXFBusImpl)bb;
            if (features != null) {
                b.setFeatures(features);
                features = null;
            }
            if (properties != null) {
                b.setProperties(properties);
                properties = null;
            }
            if (!getInInterceptors().isEmpty()) {
                b.setInInterceptors(getInInterceptors());
            }
            if (!getOutInterceptors().isEmpty()) {
                b.setOutInterceptors(getOutInterceptors());
            }
            if (!getInFaultInterceptors().isEmpty()) {
                b.setInFaultInterceptors(getInFaultInterceptors());
            }
            if (!getOutFaultInterceptors().isEmpty()) {
                b.setOutFaultInterceptors(getOutFaultInterceptors());
            }
            bus = b;
        }
View Full Code Here

        assertNotNull(engine.getRegistry());
        assertNull(engine.getBus());
        assertNotNull(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);
        engine.setRegistry(reg);
        engine.setEnabled(true);
        AlternativeSelector selector = control.createMock(AlternativeSelector.class);
        engine.setAlternativeSelector(selector);
        assertSame(bus, engine.getBus());
        assertSame(reg, engine.getRegistry());
        assertTrue(engine.isEnabled());
        assertSame(selector, engine.getAlternativeSelector());
        assertNotNull(engine.createOutPolicyInfo());
        bus.shutdown(true);
    }
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.