Package org.mule.object

Examples of org.mule.object.SingletonObjectFactory


            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

    {
        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

            service.setName(AXIS_SERVICE_PROPERTY + getName());
            service.setModel(muleContext.getRegistry().lookupSystemModel());

            Map props = new HashMap();
            props.put(AXIS, axis);
            SingletonObjectFactory of = new SingletonObjectFactory(AxisServiceComponent.class, props);
            final DefaultJavaComponent component = new DefaultJavaComponent(of);
            component.setMuleContext(muleContext);
            service.setComponent(component);
        }
        return service;
View Full Code Here

    public AbderaServiceComponent()
    {
        super();

        setObjectFactory(new SingletonObjectFactory(new AbderaCallable(this)));
    }
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);

        service.setThreadingProfile(ThreadingProfile.DEFAULT_THREADING_PROFILE);
View Full Code Here

     *
     * @param callable
     */
    public SimpleCallableJavaComponent(Callable callable)
    {
        objectFactory = new SingletonObjectFactory(callable);
    }
View Full Code Here

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

                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

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.