Examples of SingletonObjectFactory


Examples of org.mule.object.SingletonObjectFactory

    {
        if (!(Callable.class.isAssignableFrom(callable)))
        {
            throw new DefaultMuleException(CoreMessages.objectNotOfCorrectType(callable, Callable.class));
        }
        objectFactory = new SingletonObjectFactory(callable);
    }
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

                latch.countDown();
            }
        });
        testComponent.initialise();
       
        final DefaultJavaComponent component = new DefaultJavaComponent(new SingletonObjectFactory(testComponent));
        component.setMuleContext(muleContext);
        service.setComponent(component);
        service.setModel(muleContext.getRegistry().lookupSystemModel());
        muleContext.getRegistry().registerService(service);
        return latch;
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

        return component(new SimpleCallableJavaComponent(callable));
    }

    public SimpleServiceBuilder component(Object o)
    {
        return component(new SingletonObjectFactory(o));
    }
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

        model.setMuleContext(context);
        context.getRegistry().applyLifecycle(model);

        final Service service = new SedaService(context);
        service.setName(name);
        final SingletonObjectFactory of = new SingletonObjectFactory(clazz, props);
        of.initialise();
        final JavaComponent component = new DefaultJavaComponent(of);
        ((MuleContextAware) component).setMuleContext(context);
        service.setComponent(component);
        service.setModel(model);
        if (initialize)
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

            service.setModel(muleContext.getRegistry().lookupSystemModel());

            RemoteDispatcherComponent rdc = new RemoteDispatcherComponent(endpoint, wireFormat, encoding, new Integer(eventTimeout));
           
            final SimpleCallableJavaComponent component = new SimpleCallableJavaComponent(
                new SingletonObjectFactory(rdc));
            component.setMuleContext(muleContext);
            service.setComponent(component);


            if (!(service.getMessageSource() instanceof CompositeMessageSource))
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

        return component(new SimpleCallableJavaComponent(callable));
    }

    public SimpleServiceBuilder component(Object o)
    {
        return component(new SingletonObjectFactory(o));
    }
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

        model.setMuleContext(context);
        context.getRegistry().applyLifecycle(model);

        final Service service = new SedaService(context);
        service.setName(name);
        final SingletonObjectFactory of = new SingletonObjectFactory(clazz, props);
        of.initialise();
        final JavaComponent component = new DefaultJavaComponent(of);
        ((MuleContextAware) component).setMuleContext(context);
        service.setComponent(component);
        service.setModel(model);
        if (initialize)
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

    {
        this.muleContext = muleContext;
        AbstractObjectFactory factory;
        if (scope == Scope.Singleton)
        {
            factory = new SingletonObjectFactory(clazz);
        }
        else
        {
            factory = new PrototypeObjectFactory(clazz);
        }
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

    }

    ComponentBuilder(Object instance, MuleContext muleContext)
    {
        this.muleContext = muleContext;
        ObjectFactory  factory = new SingletonObjectFactory(instance);
        component = new DefaultJavaComponent(factory);
    }
View Full Code Here

Examples of org.mule.object.SingletonObjectFactory

    {
        final String domainOriginal = "TEST_DOMAIN_1";

        final SedaService service = new SedaService(muleContext);
        service.setName("TEST_SERVICE");
        SingletonObjectFactory factory = new SingletonObjectFactory(Object.class);
        final DefaultJavaComponent component = new DefaultJavaComponent(factory);
        component.setMuleContext(muleContext);
        service.setComponent(component);

        ThreadingProfile defaultThreadingProfile = ThreadingProfile.DEFAULT_THREADING_PROFILE;
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.