Package org.apache.cxf.bus.extension

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


public class CXFBusImplTest extends Assert {

    @Test
    public void testConstructionWithoutExtensions() throws BusException {
       
        CXFBusImpl bus = new ExtensionManagerBus();
        assertNotNull(bus.getExtension(BindingFactoryManager.class));
        assertNotNull(bus.getExtension(ConduitInitiatorManager.class));  
        assertNotNull(bus.getExtension(DestinationFactoryManager.class));
        assertNotNull(bus.getExtension(WSDLManager.class));
        assertNotNull(bus.getExtension(PhaseManager.class));
    }
View Full Code Here


       
    }
   
    @Test
    public void testShutdownWithBusLifecycle() {
        final CXFBusImpl bus = new ExtensionManagerBus();
        BusLifeCycleManager lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
        BusLifeCycleListener listener = EasyMock.createMock(BusLifeCycleListener.class);
        EasyMock.reset(listener);
        listener.preShutdown();
        EasyMock.expectLastCall();
        listener.postShutdown();
        EasyMock.expectLastCall();       
        EasyMock.replay(listener);       
        lifeCycleManager.registerLifeCycleListener(listener);
        bus.shutdown(true);
        EasyMock.verify(listener);
       
    }
View Full Code Here

    }

    @Override
    protected Bus createBus() throws BusException {
        ExtensionManagerBus bus = new ExtensionManagerBus();
        BusFactory.setDefaultBus(bus);
        return bus;
    }
View Full Code Here

        ClassLoader origClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(new TestClassLoader());
            BusFactory factory = new CXFBusFactory() {
                public Bus createBus(Map<Class, Object> e, Map<String, Object> properties) {
                    return new ExtensionManagerBus(e, properties, this.getClass().getClassLoader());
                }
            };
            Bus bus = factory.createBus();
            assertNotNullExtensions(bus);
        } finally {
View Full Code Here

        addNamespace("xsd", SOAPConstants.XSD);
    }

    @Override
    protected Bus createBus() throws BusException {
        ExtensionManagerBus bus = new ExtensionManagerBus();
        BusFactory.setDefaultBus(bus);
        return bus;
    }
View Full Code Here

    }

    @Override
    protected Bus createBus() throws BusException {
        ExtensionManagerBus bus = new ExtensionManagerBus();
        BusFactory.setDefaultBus(bus);
        return bus;
    }
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);
        return bus;
    }
View Full Code Here

    }

    @Override
    protected Bus createBus() throws BusException {
        ExtensionManagerBus bus = new ExtensionManagerBus();
        BusFactory.setDefaultBus(bus);
        return bus;
    }
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

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.