Package org.mule.api.model

Examples of org.mule.api.model.EntryPointResolverSet.invoke()


        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();

        try
        {
            RequestContext.setEvent(getTestEvent("Hello"));
            resolverSet.invoke(new MultiplePayloadsTestObject(), RequestContext.getEventContext());
            fail("Should have failed to find entrypoint.");
        }
        catch (EntryPointNotFoundException itex)
        {
            // expected
View Full Code Here


        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);

        resolverSet.invoke(new FruitBowl(), RequestContext.getEventContext());
        // fail("Should have failed to find an entrypoint.");
    }

    /**
     * If there was a method parameter specified to override the discovery mechanism
View Full Code Here

            public void polish(Fruit fruit)
            {
                // dummy
            }
        });
        resolver.invoke(apple, RequestContext.getEventContext());
    }

    /**
     * If there was a method parameter specified to override the discovery mechanism
     * and a target instance has a method accepting MuleEventContext, proceed to call
View Full Code Here

        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);

        try
        {
            resolverSet.invoke(new Kiwi(), RequestContext.getEventContext());
            fail("no such method on service");
        }
        catch (EntryPointNotFoundException e)
        {
            // expected
View Full Code Here

        FruitBowl bowl = new FruitBowl();
        assertFalse(bowl.hasApple());
        assertFalse(bowl.hasBanana());

        resolverSet.invoke(bowl, RequestContext.getEventContext());

        assertTrue(bowl.hasApple());
        assertTrue(bowl.hasBanana());
    }
View Full Code Here

        FruitBowl bowl = new FruitBowl();
        assertFalse(bowl.hasApple());
        assertFalse(bowl.hasBanana());

        resolverSet.invoke(bowl, RequestContext.getEventContext());

        assertTrue(bowl.hasApple());
        assertTrue(bowl.hasBanana());
    }
View Full Code Here

        FruitBowl bowl = new FruitBowl();
        assertFalse(bowl.hasApple());
        assertFalse(bowl.hasBanana());

        resolverSet.invoke(bowl, RequestContext.getEventContext());

        assertTrue(bowl.hasApple());
        assertTrue(bowl.hasBanana());
    }
}
View Full Code Here

        EntryPointResolverSet resolverSet = new LegacyEntryPointResolverSet();

        try
        {
            RequestContext.setEvent(getTestEvent("Hello"));
            resolverSet.invoke(new MultiplePayloadsTestObject(), RequestContext.getEventContext());
            fail("Should have failed to find entrypoint.");
        }
        catch (EntryPointNotFoundException itex)
        {
            // expected
View Full Code Here

        // those are usually set on the endpoint and copied over to the message
        final String methodName = "nosuchmethod";
        final String propertyName = MuleProperties.MULE_METHOD_PROPERTY;
        RequestContext.getEventContext().getMessage().setOutboundProperty(propertyName, methodName);

        resolverSet.invoke(new FruitBowl(), RequestContext.getEventContext());
        // fail("Should have failed to find an entrypoint.");
    }

    /**
     * If there was a method parameter specified to override the discovery mechanism
View Full Code Here

            public void polish(Fruit fruit)
            {
                // dummy
            }
        });
        resolver.invoke(apple, RequestContext.getEventContext());
    }

    /**
     * If there was a method parameter specified to override the discovery mechanism
     * and a target instance has a method accepting MuleEventContext, proceed to call
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.