Package org.apache.avalon.phoenix.metainfo

Examples of org.apache.avalon.phoenix.metainfo.ServiceDescriptor


        for( int i = 0; i < roles.length; i++ )
        {
            final String blockName = roles[ i ].getName();
            final String roleName = roles[ i ].getRole();
            final ServiceDescriptor service =
                info.getDependency( roleName ).getService();

            //Get the other block that is providing service
            final BlockMetaData other = getBlock( blockName, others );
            if( null == other )
View Full Code Here


        for( int i = 0; i < roles.length; i++ )
        {
            final String blockName = roles[ i ].getName();
            final String roleName = roles[ i ].getRole();
            final ServiceDescriptor service =
                info.getDependency( roleName ).getService();

            //Get the other block that is providing service
            final BlockMetaData other = getBlock( blockName, others );
            if( null == other )
View Full Code Here

     */
    private DependencyDescriptor buildDependency( final String classname,
                                                  final Configuration dependency )
        throws ConfigurationException
    {
        final ServiceDescriptor service = buildService( dependency.getChild( "service" ) );
        String role = dependency.getChild( "role" ).getValue( null );

        //default to name of service if role unspecified
        if( null == role )
        {
            role = service.getName();
        }
        else
        {
            //If role is specified and it is the same as
            //service name then warn that it is redundent.
            if( role.equals( service.getName() ) )
            {
                final String message = REZ.getString( "redundent-role", classname, role );
                getLogger().warn( message );
            }
        }
View Full Code Here

        final Configuration[] elements = servicesSet.getChildren( "service" );
        final ArrayList services = new ArrayList();

        for( int i = 0; i < elements.length; i++ )
        {
            final ServiceDescriptor service = buildService( elements[ i ] );
            services.add( service );
        }

        return (ServiceDescriptor[])services.toArray( new ServiceDescriptor[ 0 ] );
    }
View Full Code Here

        throws ConfigurationException
    {
        final String name = service.getAttribute( "name" );
        final String versionString = service.getAttribute( "version", "1.0" );
        final Version version = buildVersion( versionString );
        return new ServiceDescriptor( name, version );
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.phoenix.metainfo.ServiceDescriptor

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.