Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContextServiceRevokedEvent


    protected synchronized void releaseBeanContextResources() {

        for (Class serviceClass : _serviceProviders.keySet()) {
            ServiceProvider sp = _serviceProviders.get(serviceClass);
            if (sp.isDelegated()) {
                sp.revoke(new BeanContextServiceRevokedEvent((BeanContextServices)getPeer(), serviceClass, true));
            }
        }
    }
View Full Code Here


        support.addBeanContextServicesListener(l1);
        childSupport.addBeanContextServicesListener(l2);
        support.records.assertRecord("initialize", null);
        childSupport.records.assertRecord("initialize", null);

        BeanContextServiceRevokedEvent evt = new BeanContextServiceRevokedEvent(
                support, Collection.class, false);
        support.publicFireServiceRevoked(evt);

        support.records.assertEndOfRecords();
        childSupport.records.assertEndOfRecords();
View Full Code Here

    public void testServiceRevoked() {
        MockChildBeanContextServicesSupport mockChildBeanContextServicesSupport = new MockChildBeanContextServicesSupport();
        BeanContextServicesSupport beanContextServicesSupport = new BeanContextServicesSupport();
        beanContextServicesSupport.add(mockChildBeanContextServicesSupport);
        BeanContextServiceRevokedEvent beanContextServiceRevokedEvent = new BeanContextServiceRevokedEvent(new BeanContextServicesSupport(), Collection.class,false);
        beanContextServicesSupport.serviceRevoked(beanContextServiceRevokedEvent);
        assertTrue(mockChildBeanContextServicesSupport.revokeCalled);       
    }
View Full Code Here

    support.addBeanContextServicesListener(new MyListener());
    Class c = Object.class;

    support.addService(c, new MyProvider());

    BeanContextServiceRevokedEvent revokeEvent = new BeanContextServiceRevokedEvent(
        support, c, false);

    support.serviceRevoked(revokeEvent);
        assertEquals(0, serviceRevoked);
        assertEquals(2, serviceAvailable);
View Full Code Here

TOP

Related Classes of java.beans.beancontext.BeanContextServiceRevokedEvent

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.