Package org.apache.hivemind.definition.impl

Examples of org.apache.hivemind.definition.impl.ServicePointDefinitionImpl


        Module module = newModule();

        replayControls();

        ModuleDefinition moduleDefinition = createModuleDefinition("module");
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDefinition, "zip.zap", l, Visibility.PUBLIC, "foo.bar.Baz");
        ServicePointImpl sp = new ServicePointImpl(module, definition);

        try
        {
            sp.getServiceInterface();
View Full Code Here


        MockControl modulec = newControl(Module.class);
        Module module = (Module) modulec.getMock();

        ModuleDefinition moduleDef = createModuleDefinition("foo");
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDef, "bar", l, Visibility.PUBLIC, "java.util.List");
        definition.addImplementation(new ImplementationDefinitionImpl(moduleDef, l, null, "fred", true));
        ServicePointImpl sp = new ServicePointImpl(module, definition);

        Object service = new ArrayList();

        MockControl factoryc = newControl(ServiceModelFactory.class);
View Full Code Here

      RegistryDefinition definition = new RegistryDefinitionImpl();
     
        ModuleDefinitionImpl fooBar = createModuleDefinition("foo.bar");

        ServicePointDefinitionImpl spd = createServicePointDefinition(fooBar, "sp1", Runnable.class);

        fooBar.addServicePoint(spd);

        ModuleDefinitionImpl zipZoop = createModuleDefinition("zip.zoop");
View Full Code Here

        RegistryDefinition definition = new RegistryDefinitionImpl();

        ModuleDefinitionImpl module = createModuleDefinition("hivemind.tests.serviceByInterface");
        definition.addModule(module);
       
        ServicePointDefinitionImpl sp1 = createServicePointDefinition(module, "BeanInterface", BeanInterface.class);
        ImplementationDefinition impl = new ImplementationDefinitionImpl(module, newLocation(),
                constructor, ServiceModel.SINGLETON, true);
        sp1.addImplementation(impl);
        module.addServicePoint(sp1);
        Registry reg = buildFrameworkRegistry(module);
        return reg;
    }
View Full Code Here

        module.toString();
        new RegistryInfrastructureImpl(null, Locale.ENGLISH).toString();
        new InterceptorStackImpl(null, mockServicePoint, null).toString();

        ModuleDefinition md = new ModuleDefinitionImpl("module", null, null, null);
        ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(md, "service", null,
                Visibility.PUBLIC, Runnable.class.getName());
        ImplementationDefinition sid = new ImplementationDefinitionImpl(md,
                null, null, ServiceModel.PRIMITIVE, true);
        spd.addImplementation(sid);
        new ServicePointImpl(module, spd).toString();
    }
View Full Code Here

        Visibility visibility = Visibility.PUBLIC;
        if (Modifier.isProtected(method.getModifiers())) {
            visibility = Visibility.PRIVATE;
        }
        ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(module, service.id(), location,
                visibility, method.getReturnType().getName());
        module.addServicePoint(spd);

        ImplementationConstructor constructor = new MethodCallImplementationConstructor(location,
                method, instanceProvider);

        ImplementationDefinition sid = new ImplementationDefinitionImpl(module, location,
                constructor, service.serviceModel(), true);

        spd.addImplementation(sid);

    }
View Full Code Here

     */
    private Registry createModuleWithShutdownListener(final String serviceModel)
    {
        ModuleDefinitionImpl module = createModuleDefinition("module1");
       
        ServicePointDefinitionImpl sp1 = createServicePointDefinition(module, "Listener", Runnable.class);
       
        ImplementationConstructor constructor = new AbstractServiceImplementationConstructor(newLocation()) {

            public Object constructCoreServiceImplementation(ImplementationConstructionContext context)
            {
                RunnableImpl result = new RunnableImpl();
                result.setType(serviceModel);
                return result;
            }};
       
        ImplementationDefinition impl = new ImplementationDefinitionImpl(module, newLocation(),
                constructor, serviceModel, true);
        sp1.addImplementation(impl);
        module.addServicePoint(sp1);
        return buildFrameworkRegistry(module);
    }
View Full Code Here

    }

    private ServicePointImpl createServicePoint(ModuleDefinition moduleDefinition, final ModuleImpl module, String id, Class serviceInterface, Visibility visibility)
    {
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDefinition, id, newLocation(), visibility, serviceInterface.getName());
        final ServicePointImpl servicePoint2 = new ServicePointImpl(module, definition);
        return servicePoint2;
    }
View Full Code Here

        return servicePoint2;
    }

    private ServicePointImpl createServicePoint(ModuleDefinition moduleDefinition, final ModuleImpl module, String id, String serviceInterfaceName, Visibility visibility )
    {
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDefinition, id, newLocation(), visibility, serviceInterfaceName);
        final ServicePointImpl servicePoint2 = new ServicePointImpl(module, definition);
        return servicePoint2;
    }
View Full Code Here

    /**
     * Convenience method for creating a {@link ServicePointDefinitionImpl}.
     */
    protected ServicePointDefinitionImpl createServicePointDefinition(ModuleDefinition module, String pointId, Class serviceInterface)
    {
        ServicePointDefinitionImpl result = new ServicePointDefinitionImpl(module, pointId,
                newLocation(), Visibility.PUBLIC, serviceInterface.getName());

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.definition.impl.ServicePointDefinitionImpl

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.