Package org.mule.object

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


        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

            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

        return component(new SimpleCallableJavaComponent(callable));
    }

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

        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

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

    }

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

    {
        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

            QueueProfile queueProfile = QueueProfile.newInstancePersistingToDefaultMemoryQueueStore(muleContext);
            s.setQueueProfile(queueProfile);

            ((CompositeMessageSource) s.getMessageSource()).addSource(
                muleContext.getEndpointFactory().getInboundEndpoint(newEndpoint));
            final DefaultJavaComponent component = new DefaultJavaComponent(new SingletonObjectFactory(listener));
            component.setMuleContext(muleContext);
            s.setComponent(component);
            muleContext.getRegistry().registerService(s);
            return true;
        }
View Full Code Here

                InboundEndpoint endpoint = endpointFactory.getInboundEndpoint(endpointBuilder);

                messageRouter.addSource(endpoint);
            }
        }
        DefaultJavaComponent component = new DefaultJavaComponent(new SingletonObjectFactory(this));
        component.setMuleContext(muleContext);
        service.setComponent(component);
        return service;
    }
View Full Code Here

TOP

Related Classes of org.mule.object.SingletonObjectFactory

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.