Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.ReferenceCollectionListener


        bundleContext = null;
        for (ServerInstance instance : servers) {
            this.servers.put(instance.getServerName(), instance);
        }
        if (servers instanceof ReferenceCollection) {
            ((ReferenceCollection) servers).addReferenceCollectionListener(new ReferenceCollectionListener() {

                public void memberAdded(ReferenceCollectionEvent event) {
                    ServerInstance instance = (ServerInstance) event.getMember();
                    PluginInstallerGBean.this.servers.put(instance.getServerName(), instance);
                }
View Full Code Here


        verifyObjectName(myObjectName);

        this.server = server;
        this.application = application;
        this.deploymentDescriptor = deploymentDescriptor;
        ((ReferenceCollection) ejbs).addReferenceCollectionListener(new ReferenceCollectionListener() {

            public void memberAdded(ReferenceCollectionEvent event) {
                EjbDeployment ejb = (EjbDeployment) event.getMember();
                addEjb(ejb);
            }
View Full Code Here

            return;
        }

        if (resourceAdapterWrappers instanceof ReferenceCollection) {
            ReferenceCollection referenceCollection = (ReferenceCollection) resourceAdapterWrappers;
            referenceCollection.addReferenceCollectionListener(new ReferenceCollectionListener() {
                public void memberAdded(ReferenceCollectionEvent event) {
                    addResourceAdapter((ResourceAdapterWrapper) event.getMember());
                }

                public void memberRemoved(ReferenceCollectionEvent event) {
View Full Code Here

    protected AbstractBuilderCollection(Collection<T> builders, final QName basePlanElementName) {
        this.builders = builders == null ? Collections.EMPTY_SET : builders;
        this.basePlanElementName = basePlanElementName;
        if (builders instanceof ReferenceCollection) {
            ((ReferenceCollection) builders).addReferenceCollectionListener(new ReferenceCollectionListener() {

                public void memberAdded(ReferenceCollectionEvent event) {
                    addBuilder((T) event.getMember());
                }
View Full Code Here

            return;
        }

        if (resourceAdapterWrappers instanceof ReferenceCollection) {
            ReferenceCollection referenceCollection = (ReferenceCollection) resourceAdapterWrappers;
            referenceCollection.addReferenceCollectionListener(new ReferenceCollectionListener() {
                public void memberAdded(ReferenceCollectionEvent event) {
                    addResourceAdapter((ResourceAdapterWrapper) event.getMember());
                }

                public void memberRemoved(ReferenceCollectionEvent event) {
View Full Code Here

    private String defaultNamespace;

    public SwitchingModuleBuilder(Collection builders) {
        ReferenceCollection buildersCollection = (ReferenceCollection) builders;
        buildersCollection.addReferenceCollectionListener(new ReferenceCollectionListener() {
            public void memberAdded(ReferenceCollectionEvent event) {
                ModuleBuilder builder = (ModuleBuilder) event.getMember();
                String namespace = builder.getSchemaNamespace();
                namespaceToBuilderMap.put(namespace, builder);
            }
View Full Code Here

            setDispatches(dispatches);
            setPathSpecs(urlPatterns);
            if (jettyServletHolders != null) {
                resetServlets();
                if (jettyServletHolders instanceof ReferenceCollection) {
                    ((ReferenceCollection) jettyServletHolders).addReferenceCollectionListener(new ReferenceCollectionListener() {

                        public void memberAdded(ReferenceCollectionEvent event) {
                            resetServlets();
                            resetJettyFilterMappings();
                        }
View Full Code Here

        }
       
        //Add the hosts
        if (hosts instanceof ReferenceCollection) {
            ReferenceCollection refs = (ReferenceCollection)hosts;
            refs.addReferenceCollectionListener(new ReferenceCollectionListener() {

                public void memberAdded(ReferenceCollectionEvent event) {
                    Object o = event.getMember();
                    ObjectRetriever objectRetriever = (ObjectRetriever) o;
                    String hostName = ((Host)objectRetriever.getInternalObject()).getName();
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member added event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberAdded(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
    }
View Full Code Here

            listenerCopy = new ArrayList(listeners);
        }

        // fire the member removed event
        for (Iterator iterator = listenerCopy.iterator(); iterator.hasNext();) {
            ReferenceCollectionListener listener = (ReferenceCollectionListener) iterator.next();
            try {
                listener.memberRemoved(new ReferenceCollectionEvent(name, proxy));
            } catch (Throwable t) {
                log.error("Listener threw exception", t);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.gbean.ReferenceCollectionListener

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.