Package org.codehaus.plexus

Examples of org.codehaus.plexus.MutablePlexusContainer


                String role = listenerDescriptor.getRole();
                String roleHint = listenerDescriptor.getRoleHint();

                try
                {
                    MutablePlexusContainer container = context.getContainer();

                    ComponentDiscoveryListener listener;

                    if ( container.getParentContainer() != null )
                    {
                        try
                        {
                            listener = (ComponentDiscoveryListener) container.getParentContainer().lookup(
                                role,
                                roleHint );
                        }
                        catch ( ComponentLookupException e )
                        {
                            listener = (ComponentDiscoveryListener) container.lookup( role, roleHint );
                        }
                    }
                    else
                    {
                        listener = (ComponentDiscoveryListener) container.lookup( role, roleHint );
                    }

                    container.getComponentDiscovererManager().registerComponentDiscoveryListener( listener );
                }
                catch ( ComponentLookupException e )
                {
                    throw new ContainerInitializationException( "Error looking up component discovery listener.", e );
                }
View Full Code Here


                String role = listenerDescriptor.getRole();
                String roleHint = listenerDescriptor.getRoleHint();

                try
                {
                    MutablePlexusContainer container = context.getContainer();

                    ComponentDiscoveryListener listener;

                    if ( container.getParentContainer() != null )
                    {
                        listener = (ComponentDiscoveryListener) container.getParentContainer().lookup( role, roleHint );

                        if ( listener == null )
                        {
                            listener = (ComponentDiscoveryListener) container.lookup( role, roleHint );
                        }
                    }
                    else
                    {
                        listener = (ComponentDiscoveryListener) container.lookup( role, roleHint );
                    }

                    container.getComponentDiscovererManager().registerComponentDiscoveryListener( listener );
                }
                catch ( ComponentLookupException e )
                {
                    throw new ContainerInitializationException( "Error looking up component discovery listener.", e );
                }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.MutablePlexusContainer

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.