Package org.codehaus.loom.components.util.metadata

Examples of org.codehaus.loom.components.util.metadata.PartitionTemplate


    private Logger m_logger;

    public PartitionProfile buildProfile( final Map parameters )
        throws Exception
    {
        final PartitionTemplate metaData = m_assembler.buildAssembly( parameters );
        final ClassLoader classLoader =
            (ClassLoader)parameters.get( ContainerConstants.ASSEMBLY_CLASSLOADER );
        final ComponentFactory factory = new DefaultComponentFactory( classLoader, getLogger() );

        return assembleSarProfile( metaData, factory, classLoader );
View Full Code Here


    private PartitionProfile assembleSarProfile( final PartitionTemplate metaData,
                                                 final ComponentFactory factory,
                                                 final ClassLoader classLoader )
        throws Exception
    {
        final PartitionTemplate blockPartition =
            metaData.getPartition( ContainerConstants.BLOCK_PARTITION );
        final PartitionTemplate listenerPartition =
            metaData.getPartition( ContainerConstants.LISTENER_PARTITION );

        final PartitionProfile blockProfile = assembleProfile( blockPartition,
                                                               factory );
        final PartitionProfile listenerProfile =
View Full Code Here

    {
        final ArrayList partitionSet = new ArrayList();
        final PartitionTemplate[] partitions = metaData.getPartitions();
        for( int i = 0; i < partitions.length; i++ )
        {
            final PartitionTemplate partition = partitions[i];
            final PartitionProfile profile = assembleProfile( partition,
                                                              factory );
            partitionSet.add( profile );
        }
View Full Code Here

                                           final Configuration assembly )
        throws LoomException
    {
        final Configuration[] blockConfig = assembly.getChildren( "block" );
        final ComponentTemplate[] blocks = buildBlocks( blockConfig, config );
        final PartitionTemplate blockPartition =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   blocks );

        final Configuration[] listenerConfig = assembly.getChildren(
            "listener" );
        final ComponentTemplate[] listeners = buildBlockListeners(
            listenerConfig, config );
        final PartitionTemplate listenerPartition =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   listeners );

        final PartitionTemplate[] partitions =
            new PartitionTemplate[]{blockPartition, listenerPartition};

        return new PartitionTemplate( name,
                                      new String[ 0 ],
                                      partitions,
                                      ComponentTemplate.EMPTY_SET );
    }
View Full Code Here

                                   Component2.class.getName(),
                                   DependencyDirective.EMPTY_SET,
                                   null,
                                   null,
                                   false );
        final PartitionTemplate listenerMetaData =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   ComponentTemplate.EMPTY_SET );
        final PartitionTemplate blockMetaData =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   new ComponentTemplate[]{c1MetaData,
                                                           c2MetaData} );
        final PartitionTemplate metaData =
            new PartitionTemplate( "assembly1",
                                   new String[ 0 ],
                                   new PartitionTemplate[]{blockMetaData,
                                                           listenerMetaData},
                                   ComponentTemplate.EMPTY_SET );
        final ComponentInfo c1Info =
View Full Code Here

                                   Component2.class.getName(),
                                   DependencyDirective.EMPTY_SET,
                                   null,
                                   null,
                                   false );
        final PartitionTemplate listenerMetaData =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   ComponentTemplate.EMPTY_SET );
        final PartitionTemplate blockMetaData =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   new ComponentTemplate[]{c2aMetaData,
                                                           c2bMetaData,
                                                           c2cMetaData,
                                                           c3MetaData} );
        final PartitionTemplate metaData =
            new PartitionTemplate( "assembly1",
                                   new String[ 0 ],
                                   new PartitionTemplate[]{blockMetaData,
                                                           listenerMetaData},
                                   ComponentTemplate.EMPTY_SET );
View Full Code Here

                                   DependencyDirective.EMPTY_SET,
                                   null,
                                   null,
                                   true );
        final ComponentProfile cp2 = new ComponentProfile( C2, md2 );
        final PartitionTemplate blockPartitionMD =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   new ComponentTemplate[]{md1, md2} );
        final PartitionTemplate listenerPartitionMD =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   ComponentTemplate.EMPTY_SET );
        final PartitionTemplate partitionMD =
            new PartitionTemplate( "test",
                                   new String[ 0 ],
                                   new PartitionTemplate[]{blockPartitionMD,
                                                           listenerPartitionMD},
                                   ComponentTemplate.EMPTY_SET );
View Full Code Here

                                   null,
                                   null,
                                   false );
        final ComponentProfile cp2c = new ComponentProfile( C2, md2c );

        final PartitionTemplate blockPartitionMD =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   new ComponentTemplate[]{md3,
                                                           md2a,
                                                           md2b,
                                                           md2c} );
        final PartitionTemplate listenerPartitionMD =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   ComponentTemplate.EMPTY_SET );
        final PartitionTemplate partitionMD =
            new PartitionTemplate( "test",
                                   new String[ 0 ],
                                   new PartitionTemplate[]{blockPartitionMD,
                                                           listenerPartitionMD},
                                   ComponentTemplate.EMPTY_SET );
View Full Code Here

                                   null,
                                   null,
                                   false );
        final ComponentProfile cp2c = new ComponentProfile( C2, md2c );

        final PartitionTemplate blockPartitionMD =
            new PartitionTemplate( ContainerConstants.BLOCK_PARTITION,
                                   new String[]{
                                       ContainerConstants.LISTENER_PARTITION},
                                   PartitionTemplate.EMPTY_SET,
                                   new ComponentTemplate[]{md4,
                                                           md2a,
                                                           md2b,
                                                           md2c} );
        final PartitionTemplate listenerPartitionMD =
            new PartitionTemplate( ContainerConstants.LISTENER_PARTITION,
                                   new String[ 0 ],
                                   PartitionTemplate.EMPTY_SET,
                                   ComponentTemplate.EMPTY_SET );
        final PartitionTemplate partitionMD =
            new PartitionTemplate( "test",
                                   new String[ 0 ],
                                   new PartitionTemplate[]{blockPartitionMD,
                                                           listenerPartitionMD},
                                   ComponentTemplate.EMPTY_SET );
View Full Code Here

TOP

Related Classes of org.codehaus.loom.components.util.metadata.PartitionTemplate

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.