Search in sources :

Example 6 with ExtensionManagerBus

use of org.apache.cxf.bus.extension.ExtensionManagerBus in project cxf by apache.

the class AbstractAegisTest method createBus.

@Override
protected Bus createBus() throws BusException {
    ExtensionManagerBus bus = new ExtensionManagerBus();
    BusFactory.setDefaultBus(bus);
    return bus;
}
Also used : ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus)

Example 7 with ExtensionManagerBus

use of org.apache.cxf.bus.extension.ExtensionManagerBus in project cxf by apache.

the class ClientCapture method main.

public static void main(String[] args) throws Exception {
    if (args.length < 2) {
        System.err.println("please provide wsdl and classes dump location");
        System.exit(0);
    }
    final Bus bus = new ExtensionManagerBus();
    BusFactory.setDefaultBus(bus);
    final DumpingClassLoaderCapturer capturer = new DumpingClassLoaderCapturer();
    bus.setExtension(capturer, GeneratedClassClassLoaderCapture.class);
    Client.run(args, bus);
    capturer.dumpTo(new File(args[1]));
    System.exit(0);
}
Also used : Bus(org.apache.cxf.Bus) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) File(java.io.File)

Example 8 with ExtensionManagerBus

use of org.apache.cxf.bus.extension.ExtensionManagerBus in project cxf by apache.

the class ASMHelperTest method testLoader.

@Test
public void testLoader() throws Exception {
    CustomLoader cl = new CustomLoader(new ExtensionManagerBus());
    Class<?> clz = cl.createCustom();
    assertNotNull(clz);
    assertTrue(cl.isFound());
}
Also used : ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) Test(org.junit.Test)

Example 9 with ExtensionManagerBus

use of org.apache.cxf.bus.extension.ExtensionManagerBus in project cxf by apache.

the class CXFBusImplTest method testBusID.

@Test
public void testBusID() {
    Bus bus = new ExtensionManagerBus();
    String id = bus.getId();
    assertEquals("The bus id should be cxf", id, Bus.DEFAULT_BUS_ID + Math.abs(bus.hashCode()));
    bus.setId("test");
    assertEquals("The bus id should be changed", "test", bus.getId());
    bus.shutdown(true);
}
Also used : Bus(org.apache.cxf.Bus) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) Test(org.junit.Test)

Example 10 with ExtensionManagerBus

use of org.apache.cxf.bus.extension.ExtensionManagerBus in project cxf by apache.

the class CXFBusImplTest method testShutdownWithBusLifecycle.

@Test
public void testShutdownWithBusLifecycle() {
    final Bus 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);
    bus.shutdown(true);
}
Also used : Bus(org.apache.cxf.Bus) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) BusLifeCycleManager(org.apache.cxf.buslifecycle.BusLifeCycleManager) BusLifeCycleListener(org.apache.cxf.buslifecycle.BusLifeCycleListener) ExtensionManagerBus(org.apache.cxf.bus.extension.ExtensionManagerBus) Test(org.junit.Test)

Aggregations

ExtensionManagerBus (org.apache.cxf.bus.extension.ExtensionManagerBus)59 Bus (org.apache.cxf.Bus)48 Test (org.junit.Test)44 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)28 Message (org.apache.cxf.message.Message)14 HTTPTransportFactory (org.apache.cxf.transport.http.HTTPTransportFactory)14 QName (javax.xml.namespace.QName)8 DestinationRegistry (org.apache.cxf.transport.http.DestinationRegistry)8 ServiceInfo (org.apache.cxf.service.model.ServiceInfo)7 ArrayList (java.util.ArrayList)6 AtmosphereInterceptor (org.atmosphere.cpr.AtmosphereInterceptor)6 HashMap (java.util.HashMap)5 HashSet (java.util.HashSet)5 URL (java.net.URL)4 List (java.util.List)4 ASMHelperImpl (org.apache.cxf.common.util.ASMHelperImpl)4 MessageObserver (org.apache.cxf.transport.MessageObserver)4 HTTPServerPolicy (org.apache.cxf.transports.http.configuration.HTTPServerPolicy)4 HttpURLConnection (java.net.HttpURLConnection)3 Hashtable (java.util.Hashtable)3