Package org.apache.cxf.bus

Examples of org.apache.cxf.bus.CXFBusImpl$ExtensionFinder


     * over a Basic Auth Supplier with preemptive UserPass, and that
     * followed by setting it directly on the Conduit.
     */
    @Test
    public void testAuthPolicyPrecedence() 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


*/
public class EndpointImplTest extends Assert {
   
    @Test
    public void testEqualsAndHashCode() throws Exception {
        Bus bus = new CXFBusImpl();
        Service svc = new ServiceImpl();
        EndpointInfo ei = new EndpointInfo();
        ei.setAddress("http://nowhere.com/bar/foo");
        EndpointInfo ei2 = new EndpointInfo();
        ei2.setAddress("http://nowhere.com/foo/bar");
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

            "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

            "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

    }
   
    @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

TOP

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

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.