Package org.mule.api.model

Examples of org.mule.api.model.Model


    protected Service getDefaultService() throws MuleException
    {
        // When the the beanFactory is refreshed all the beans get
        // reloaded so we need to unregister the service from Mule
        Model model = muleContext.getRegistry().lookupModel(MuleProperties.OBJECT_SYSTEM_MODEL);
        if (model == null)
        {
            model = new SedaModel();
            model.setName(MuleProperties.OBJECT_SYSTEM_MODEL);
            muleContext.getRegistry().registerModel(model);
        }
        Service service = muleContext.getRegistry().lookupService(EVENT_MULTICASTER_DESCRIPTOR_NAME);
        if (service != null)
        {
View Full Code Here


            new ChainedThreadingProfile(defaultThreadingProfile));
    }

    protected void configureSystemModel(MuleRegistry registry) throws MuleException
    {
        Model systemModel = new SedaModel();
        systemModel.setName(MuleProperties.OBJECT_SYSTEM_MODEL);

        registry.registerModel(systemModel);
    }
View Full Code Here

    {
        if (modelClass != null)
        {
            try
            {
                Model model = (Model)ClassUtils.instanciateClass(modelClass, ClassUtils.NO_ARGS, getClass());
                BeanUtils.populateWithoutFail(model, properties, false);
                return model;
            }
            catch (Exception e)
            {
View Full Code Here

        return modelName;
    }

    protected JcaModel getJcaModel(String modelName) throws MuleException, ResourceException
    {
        Model model = muleContext.getRegistry().lookupModel(modelName);
        if (model != null)
        {
            if (model instanceof JcaModel)
            {
                return (JcaModel) model;
View Full Code Here

        assertEquals("jca", jcaModel.getName());
    }

    public void testGetJcaModelUseExisting() throws MuleException, ResourceException
    {
        Model jcaModel = new JcaModel();
        jcaModel.setName("jca");
        muleContext.getRegistry().registerModel(jcaModel);
        JcaModel jcaModel2 = resourceAdapter.getJcaModel("jca");
        assertEquals("jca", jcaModel2.getName());
        assertEquals(jcaModel, jcaModel2);
    }
View Full Code Here

        assertEquals(jcaModel, jcaModel2);
    }

    public void testGetJcaModel3ExistingWrongType() throws MuleException
    {
        Model sedaModel = new SedaModel();
        sedaModel.setName("jca");
        muleContext.getRegistry().registerModel(sedaModel);
        try
        {
            resourceAdapter.getJcaModel("jca");
            fail("Exception Expected: Model is not JcaModel");
View Full Code Here

        service = new SedaService(muleContext);
        service.setName("testService");
        ((CompositeMessageSource) service.getMessageSource()).addSource(inboundEndpoint1);
        ((CompositeMessageSource) service.getMessageSource()).addSource(inboundEndpoint2);
        Model model = new SedaModel();
        model.setMuleContext(muleContext);
        model.initialise();
        service.setModel(model);
       
        QueueProfile queueProfile = QueueProfile.newInstancePersistingToDefaultMemoryQueueStore(muleContext);
        ((SedaService) service).setQueueProfile(queueProfile);
View Full Code Here

    {
        @Override
        protected void doConfigure(MuleContext context) throws Exception
        {
            context.getRegistry().registerObject(TEST_STRING_KEY2, TEST_STRING_VALUE2);
            Model testModel = new SedaModel();
            testModel.setName(TEST_MODEL_NAME);
            context.getRegistry().registerModel(testModel);
        }
View Full Code Here

        assertNotNull(((TestCompressionTransformer) t).getContainerProperty());
    }

    public void testModelConfig() throws Exception
    {
        Model model = muleContext.getRegistry().lookupModel("main");
        assertNotNull(model);
        assertEquals("main", model.getName());
        if (legacy)
        {
            assertTrue(model.getEntryPointResolverSet() instanceof LegacyEntryPointResolverSet);
        }
        else
        {
            assertTrue(model.getEntryPointResolverSet() instanceof TestEntryPointResolverSet);
        }
        assertTrue(model.getExceptionListener() instanceof TestExceptionStrategy);

        assertTrue(((AbstractExceptionStrategy) model.getExceptionListener()).getMessageProcessors().size() > 0);
        OutboundEndpoint ep = (OutboundEndpoint) ((AbstractExceptionStrategy) model.getExceptionListener()).getMessageProcessors().get(0);

        assertEquals("test://component.exceptions", ep.getEndpointURI().toString());

        // assertTrue(model.isComponentRegistered("orangeComponent"));
    }
View Full Code Here

    {
        if (modelClass != null)
        {
            try
            {
                Model model = (Model)ClassUtils.instanciateClass(modelClass, ClassUtils.NO_ARGS, getClass());
                BeanUtils.populateWithoutFail(model, properties, false);
                return model;
            }
            catch (Exception e)
            {
View Full Code Here

TOP

Related Classes of org.mule.api.model.Model

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.