Package org.apache.cxf.event

Examples of org.apache.cxf.event.EventProcessor


    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        EventProcessor eventProcessor;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
View Full Code Here


    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        EventProcessor eventProcessor;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
View Full Code Here

    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        EventProcessor eventProcessor;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
View Full Code Here

    public void testWorkQueueInstrumentation() throws Exception {
        assertTrue("Instrumentation Manager should not be null", im != null);
        //im.getAllInstrumentation();
        WorkQueueManagerImpl wqm = new WorkQueueManagerImpl();
        wqm.setBus(bus);
        EventProcessor ep = bus.getExtension(EventProcessor.class);
        QName eventID = new QName(ComponentEventFilter.COMPONENT_CREATED_EVENT);
        if (null != ep) {        
            ep.sendEvent(new Event(wqm, eventID));
        }       
       
        //NOTE: now the bus WorkQueueManager is lazy load , if WorkQueueManager
        //create with bus , this test could be failed.
        List<Instrumentation> list = im.getAllInstrumentation();
        //NOTE: change for the BindingManager and TransportFactoryManager instrumentation
        // create with the bus.
        assertEquals("Too many instrumented items", 1, list.size());
        Instrumentation it1 = list.get(0);
        //Instrumentation it2 = list.get(3);
        assertTrue("Item 1 not a WorkQueueInstrumentation",
                   WorkQueueInstrumentation.class.isAssignableFrom(it1.getClass()));
       
        // not check for the instrumentation unique name
        // sleep for the MBServer connector thread startup
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            // do nothing
        }
        eventID = new QName(ComponentEventFilter.COMPONENT_REMOVED_EVENT);
        if (null != ep) {
            ep.sendEvent(new Event(wqm, eventID));
        }   
        assertEquals("Instrumented stuff not removed from list", 0, list.size());
        bus.shutdown(true);
        assertEquals("Instrumented stuff not removed from list", 0, list.size());
    }
View Full Code Here

    }

    public synchronized AutomaticWorkQueue getAutomaticWorkQueue() {
        if (autoQueue == null) {
            autoQueue = createAutomaticWorkQueue();
            EventProcessor ep = bus.getExtension(EventProcessor.class);
            //setup the QName
            QName eventID = new QName(ComponentEventFilter.COMPONENT_CREATED_EVENT);
            if (null != ep) {               
                ep.sendEvent(new Event(this, eventID));
            }
        }
        return autoQueue;
    }
View Full Code Here

        if (autoQueue != null) {
            autoQueue.shutdown(processRemainingTasks);
        }

        //sent out remove event.
        EventProcessor ep = bus.getExtension(EventProcessor.class);
        QName eventID = new QName(ComponentEventFilter.COMPONENT_REMOVED_EVENT);
        if (null != ep) {
            ep.sendEvent(new Event(this, eventID));       
        }
        synchronized (this) {
            notifyAll();
        }
    }
View Full Code Here

        if (getInstrumentation().isEnabled()) {
            LOG.fine("Instrumentation is enabled.");
            instrumentations = new LinkedList<Instrumentation>();
            //regist to the event process
            ComponentEventFilter componentEventFilter = new ComponentEventFilter();
            EventProcessor ep = bus.getExtension(EventProcessor.class);
            if (null != ep) {               
                ep.addEventListener((EventListener)this, componentEventFilter);
            }   
        }
           
        if (getInstrumentation().isJMXEnabled()) { 
            LOG.fine("JMX is enabled.");
View Full Code Here

    public void testConstructionWithExtensions() throws BusException {
       
        IMocksControl control;
        BindingFactoryManager bindingFactoryManager;
        WSDLManager wsdlManager;
        EventProcessor eventProcessor;
        InstrumentationManager instrumentationManager;
        PhaseManager phaseManager;
       
        control = EasyMock.createNiceControl();
       
View Full Code Here

TOP

Related Classes of org.apache.cxf.event.EventProcessor

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.