Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.ModuleDescriptor


    /** @since 1.1 */

    public void testInterfaceNameQualifiedToModulePackage() throws Exception
    {
        ModuleDescriptor md = parse("InterfaceNameQualifiedToModulePackage.xml");

        ServicePointDescriptor spd = (ServicePointDescriptor) md.getServicePoints().get(0);

        assertEquals("my.package.MyServiceInterface", spd.getInterfaceClassName());
    }
View Full Code Here


    /** @since 1.1 */

    public void testNoInterface() throws Exception
    {
        ModuleDescriptor md = parse("NoInterface.xml");

        ServicePointDescriptor spd = (ServicePointDescriptor) md.getServicePoints().get(0);

        assertEquals("hivemind.test.NoInterface", spd.getInterfaceClassName());
    }
View Full Code Here

        XmlResourceProcessor parser = new XmlResourceProcessor(getClassResolver(), errorHandler);

        RegistryInfrastructureConstructor cons = new RegistryInfrastructureConstructor(
                errorHandler, LOG, assembly);

        ModuleDescriptor md = parser.processResource(getResource("Privates.xml"));

        cons.addModuleDescriptor(md);

        md = parser.processResource(getResource("ContributePrivate.xml"));

        ContributionDescriptor cd = (ContributionDescriptor) md.getContributions().get(0);

        ImplementationDescriptor id = (ImplementationDescriptor) md.getImplementations().get(0);

        InterceptorDescriptor itd = (InterceptorDescriptor) id.getInterceptors().get(0);

        cons.addModuleDescriptor(md);
View Full Code Here

        RegistryAssemblyImpl assembly = new RegistryAssemblyImpl(eh);

        DescriptorParser p = new DescriptorParser(eh, assembly);

        ModuleDescriptor result = p.parse(location, _resolver);

        assembly.performPostProcessing();

        return result;
    }
View Full Code Here

        if (_parser == null)
            _parser = new DescriptorParser(_errorHandler, _registryAssembly);

        try
        {
            ModuleDescriptor md = _parser.parse(moduleDescriptorResource, resolver);

            processModule(md);

            // After parsing a module, parse any additional modules identified
            // within the module (using the <sub-module> element.
View Full Code Here

    {
        int count = _moduleDescriptors.size();

        for (int i = 0; i < count; i++)
        {
            ModuleDescriptor md = (ModuleDescriptor) _moduleDescriptors.get(i);

            String id = md.getModuleId();

            ModuleImpl module = (ModuleImpl) _modules.get(id);

            addServicePoints(registry, module, md);
View Full Code Here

    {
        int count = _moduleDescriptors.size();

        for (int i = 0; i < count; i++)
        {
            ModuleDescriptor md = (ModuleDescriptor) _moduleDescriptors.get(i);

            if (LOG.isDebugEnabled())
                LOG.debug("Adding contributions from module " + md.getModuleId());

            addImplementations(md);
            addContributions(md);
        }
    }
View Full Code Here

        RegistryAssemblyImpl assembly = new RegistryAssemblyImpl(eh);

        DescriptorParser p = new DescriptorParser(eh, assembly);

        ModuleDescriptor result = p.parse(location, _resolver);

        assembly.performPostProcessing();

        return result;
    }
View Full Code Here

        new ConfigurationPointDescriptor().toString();
        new ContributionDescriptor().toString();
        new ImplementationDescriptor().toString();
        new CreateInstanceDescriptor().toString();
        new InvokeFactoryDescriptor().toString();
        new ModuleDescriptor().toString();
        new ServicePointDescriptor().toString();
        new InterceptorDescriptor().toString();
        new ModuleImpl().toString();
        new RegistryImpl(null, Locale.ENGLISH).toString();
        new ContributionImpl().toString();
View Full Code Here

            "Unexpected attribute(s) " + map + " in element " + e.getElementName() + ".");
    }

    public void testModuleAttributes() throws Exception
    {
        ModuleDescriptor md = parse("GenericModule.xml");

        assertEquals("hivemind.test.parse", md.getModuleId());
        assertEquals("1.0.0", md.getVersion());
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.parse.ModuleDescriptor

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.