Package org.apache.hivemind.definition

Examples of org.apache.hivemind.definition.Contribution


     */
    private void addSymbolSourcesConfiguration(ModuleDefinition md)
    {
        ConfigurationPointDefinition cpd = helper.addConfigurationPoint("SymbolSources", List.class.getName());

        helper.addContributionDefinition(cpd, new Contribution()
        {

            public void contribute(ContributionContext context)
            {
                List contribution = new ArrayList();
View Full Code Here


        ServicePointDefinition sp1 = helper.addServicePoint("StartupRunnableFixture", StartupRunnableFixture.class.getName());
        helper.addSimpleServiceImplementation(sp1, StartupRunnableFixtureImpl.class.getName(), ServiceModel.SINGLETON);

        // Add service point "StartupRunnableFixture" to Startup configuration point
        helper.addContributionDefinition("hivemind.Startup", new Contribution()
        {
            public void contribute(ContributionContext context)
            {
                List contribution = new ArrayList();
                contribution.add(context.getService(StartupRunnableFixture.class));
View Full Code Here

        // Startup objects must implement the java.lang.Runnable interface. Order of execution is expliclitly NOT defined.

        ConfigurationPointDefinition cpd = helper.addConfigurationPoint("Startup", List.class.getName());
       
        final List services = getDefaultStartupServices();
        helper.addContributionDefinition(cpd, new Contribution() {

            public void contribute(ContributionContext context)
            {
                List contribution = new ArrayList();
                for (Iterator iterServices = services.iterator(); iterServices.hasNext();)
View Full Code Here

        ConfigurationPointDefinition cpd = helper.addConfigurationPoint("ServiceModels",
                Map.class.getName());
       
        final List serviceModels = getDefaultServiceModels();
        helper.addContributionDefinition(cpd, new Contribution() {

            public void contribute(ContributionContext context)
            {
                Map contribution = new HashMap();
                for (Iterator iterServiceModels = serviceModels.iterator(); iterServiceModels.hasNext();)
View Full Code Here

    {

        ConfigurationPointDefinition cpd = helper.addConfigurationPoint("AutowiringStrategies", List.class.getName());
       
        final List serviceModels = getDefaultAutowiringStrategies();
        helper.addContributionDefinition(cpd, new Contribution() {

            public void contribute(ContributionContext context)
            {
                List contribution = new ArrayList();
                contribution.addAll(serviceModels);
View Full Code Here

        ConfigurationPointDefinitionImpl cpd = new ConfigurationPointDefinitionImpl(module, configuration.id(),
                location, visibility, method.getReturnType().getName(), Occurances.UNBOUNDED);
        module.addConfigurationPoint(cpd);
       
        // Add method implementation as initial contribution
        Contribution contribution = new MethodCallContributionConstructor(
                location, method, instanceProvider);
        ContributionDefinitionImpl cd = new ContributionDefinitionImpl(module, location, contribution, true);
        cpd.addContribution(cd);
    }
View Full Code Here

        }
       
        Location location = new AnnotatedModuleLocation(module.getLocation().getResource(),
                method.getDeclaringClass(), method);
       
        Contribution constructor = new MethodCallContributionConstructor(
                location, method, instanceProvider);

        ContributionDefinitionImpl cd = new ContributionDefinitionImpl(module, location, constructor, false);
        String qualifiedConfigurationId = IdUtils.qualify(
                module.getId(),
View Full Code Here

        ServicePointDefinition sp1 = helper.addServicePoint("Loud", Runnable.class.getName());
        helper.addSimpleServiceImplementation(sp1, LoudRunner.class.getName(), serviceModel);

        // Add service point "Loud" to EagerLoad configuration point
        helper.addContributionDefinition("hivemind.EagerLoad", new Contribution()
        {
            public void contribute(ContributionContext context)
            {
                List contribution = new ArrayList();
                contribution.add(context.getDefiningModule().getServicePoint("hivemind.test.services.Loud"));
View Full Code Here

TOP

Related Classes of org.apache.hivemind.definition.Contribution

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.