Package org.apache.cxf.bus.extension

Examples of org.apache.cxf.bus.extension.ExtensionManagerBus


     * The very first bus created is set as a default bus which then can
     * be (re)used in other places.
     */
    public static Bus getBus() {       
        getDefaultBus();
        return new ExtensionManagerBus();
    }
View Full Code Here


            "org.apache.camel.component.cxf.HelloService");
    }

    @Test
    public void testSettingClientBus() throws Exception {
        ExtensionManagerBus bus = (ExtensionManagerBus) BusFactory.newInstance().createBus();
        bus.setId("oldCXF");
        BusFactory.setThreadDefaultBus(bus);
       
        ExtensionManagerBus newBus = (ExtensionManagerBus) 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 {
        ExtensionManagerBus bus = (ExtensionManagerBus) BusFactory.newInstance().createBus();
        bus.setId("oldCXF");
        BusFactory.setThreadDefaultBus(bus);
       
        ExtensionManagerBus newBus = (ExtensionManagerBus) 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

     * The very first bus created is set as a default bus which then can
     * be (re)used in other places.
     */
    public static Bus getBus() {       
        BusFactory.getDefaultBus();
        return new ExtensionManagerBus();
    }
View Full Code Here

    public Bus createBus(Map<Class, Object> e) {
        return createBus(e, new HashMap<String, Object>());
    }
   
    public Bus createBus(Map<Class, Object> e, Map<String, Object> properties) {
        Bus bus = new ExtensionManagerBus(e, properties);
        possiblySetDefaultBus(bus);
        initializeBus(bus);
        return bus;
    }
View Full Code Here

     * The very first bus created is set as a default bus which then can
     * be (re)used in other places.
     */
    public static Bus getBus() {
        getDefaultBus();
        return new ExtensionManagerBus();
    }
View Full Code Here

            @Override
            public JettyHTTPServerEngine retrieveJettyHTTPServerEngine(int port) {
                return httpEngine;
            }
        };
        Bus b2 = new ExtensionManagerBus();
        transportFactory = new HTTPTransportFactory();
        b2.setExtension(factory, JettyHTTPServerEngineFactory.class);
       
        TestJettyDestination testDestination =
            new TestJettyDestination(b2,
                                     transportFactory.getRegistry(),
                                     ei,
View Full Code Here

       
    }

    @Test
    public void testDoService() throws Exception {
        Bus defaultBus = new ExtensionManagerBus();
        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

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

     * The very first bus created is set as a default bus which then can
     * be (re)used in other places.
     */
    public static Bus getBus() {
        getDefaultBus();
        return new ExtensionManagerBus();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.bus.extension.ExtensionManagerBus

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.