Examples of addServicePoint()


Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistryWithSimpleService(final String serviceModel, final boolean manual)
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.lib.test");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        ServicePointDefinition sp1 = helper.addServicePoint("Simple", Simple.class.getName());

        // Define inline implementation constructor, that passes the ShutdownCoordinator service if manual is true
        ImplementationConstructor constructor = new AbstractServiceImplementationConstructor(module.getLocation())
        {
            public Object constructCoreServiceImplementation(ImplementationConstructionContext context)
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistryWithPojo(final String serviceModel)
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.lib.test");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        ServicePointDefinition sp1 = helper.addServicePoint("RegistryShutdownBean", RegistryShutdownBean.class.getName());
        helper.addSimpleServiceImplementation(sp1, RegistryShutdownBean.class.getName(), serviceModel);

        return buildFrameworkRegistry(module);
    }
    
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistryWithInterceptedService(String serviceName, String serviceInterface, String implementationClass,
            final List interceptedMethods)
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.test.services");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);
        ServicePointDefinition sp = helper.addServicePoint(serviceName, serviceInterface);
        helper.addSimpleServiceImplementation(sp, implementationClass, ServiceModel.SINGLETON);
       
        // Add logging interceptor
        InterceptorConstructor constructor = new AbstractServiceInterceptorConstructor(module.getLocation()) {
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

     */
    private Registry createRegistryWithRecursiveService()
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.test.services");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);
        ServicePointDefinition sp = helper.addServicePoint("Recursive", SimpleService.class.getName());

        ImplementationConstructor constructor = new AbstractServiceImplementationConstructor(module.getLocation())
        {
            public Object constructCoreServiceImplementation(ImplementationConstructionContext context)
            {
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistry()
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.test.services");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        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()
        {
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistryShutdownListener(Class implementationClass)
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.test.services");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        ServicePointDefinition sp1 = helper.addServicePoint("StringHolder", StringHolder.class.getName());
        helper.addSimpleServiceImplementation(sp1, implementationClass.getName(), ServiceModel.THREADED);

        return buildFrameworkRegistry(module);
   
   
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    public SimpleModule()
    {
        super("hivemind.test.services", createLocation(), new DefaultClassResolver(), null);
       
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(this);
        ServicePointDefinition sp = helper.addServicePoint("Simple", SimpleService.class.getName());
        helper.addSimpleServiceImplementation(sp, SimpleServiceImpl.class.getName(), ServiceModel.SINGLETON);
    }
   
    private static Location createLocation()
    {
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createEagerLoadModule(final String serviceModel)
    {
        ModuleDefinitionImpl module = createModuleDefinition("hivemind.test.services");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        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()
        {
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    public StringHolderModule(String serviceModel)
    {
        super("hivemind.test.services", null, new DefaultClassResolver(), null);
       
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(this);
        ServicePointDefinition sp = helper.addServicePoint("StringHolder", StringHolder.class.getName());
        helper.addSimpleServiceImplementation(sp, StringHolderImpl.class.getName(), serviceModel);
       
        InterceptorConstructor constructor = new AbstractServiceInterceptorConstructor(getLocation()) {

            public void constructServiceInterceptor(InterceptorStack interceptorStack, Module contributingModule)
View Full Code Here

Examples of org.apache.hivemind.definition.impl.ModuleDefinitionHelper.addServicePoint()

    private Registry createRegistryWithPojo(final String serviceModel)
    {
        ModuleDefinitionImpl module = createModuleDefinition("bean");
        ModuleDefinitionHelper helper = new ModuleDefinitionHelper(module);

        ServicePointDefinition sp1 = helper.addServicePoint("Reverser", Reverser.class.getName());
        helper.addSimpleServiceImplementation(sp1, Reverser.class.getName(), serviceModel);

        return buildFrameworkRegistry(module);
    }   
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.