Package org.mule.tck.functional

Examples of org.mule.tck.functional.EventCallback


    private void doJmsBasedTest(final String jmsDestinationUri, final String ftcName) throws Exception, MuleException, InterruptedException
    {
        final FunctionalTestComponent ftc = getFunctionalTestComponent(ftcName);
        final Latch latch = new Latch();
        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                latch.countDown();
View Full Code Here


    public void testReplyToIsHonoredInFlowUsingAsyncBlock() throws Exception
    {
        org.mule.api.client.LocalMuleClient client = muleContext.getClient();
        final org.mule.util.concurrent.Latch flowExecutedLatch = new org.mule.util.concurrent.Latch();
        FunctionalTestComponent ftc = getFunctionalTestComponent("replierService");
        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(org.mule.api.MuleEventContext context, Object component) throws Exception
            {
                flowExecutedLatch.release();
View Full Code Here

    private void sendMessageAndExpectReply(String flow, String path, String expectedMessage) throws Exception
    {
        final CountDownLatch subFlowLatch = new CountDownLatch(1);

        getFunctionalTestComponent(flow).setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                subFlowLatch.countDown();
View Full Code Here

        FunctionalTestComponent hop1 = getFunctionalTestComponent("hop1Service");
        FunctionalTestComponent hop2 = getFunctionalTestComponent("hop2Service");
        assertNotNull(hop1);

        final AtomicBoolean hop1made = new AtomicBoolean(false);
        EventCallback callback1 = new EventCallback()
        {
            @Override
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                assertTrue(hop1made.compareAndSet(false, true));
                FunctionalTestComponent ftc = (FunctionalTestComponent) component;
                ftc.setReturnData("Hop1 ACK");
            }
        };

        final AtomicBoolean hop2made = new AtomicBoolean(false);
        EventCallback callback2 = new EventCallback()
        {
            @Override
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                MuleMessage msg = context.getMessage();
View Full Code Here

    @Test
    public void testRoutePayloadBeforeException() throws Exception
    {
        final Latch messageProcessedLatch = new Latch();
        FunctionalTestComponent ftc = getFunctionalTestComponent("LastMessageStateRouting");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                messageProcessedLatch.release();
                throw new RuntimeException();
View Full Code Here

    @Test
    public void testRouteOriginalPayload() throws Exception
    {
        final Latch messageProcessedLatch = new Latch();
        FunctionalTestComponent ftc = getFunctionalTestComponent("OriginalMessageRouting");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                messageProcessedLatch.release();
                throw new RuntimeException();
View Full Code Here

    @Test
    public void testRouteByExceptionType() throws Exception
    {
        final CountDownLatch messageProcessedLatch = new CountDownLatch(3);
        FunctionalTestComponent ftc = getFunctionalTestComponent("RouteByExceptionType");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                messageProcessedLatch.countDown();
                throw new RuntimeException();
View Full Code Here

    public void testReceiveAsWebService() throws Exception
    {
        MuleClient client = muleContext.getClient();
        OrderManagerBean orderManager = muleContext.getRegistry().get("orderManagerBean");
        assertNotNull(orderManager);
        EventCallback callback = new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object o) throws Exception
            {
                eventCount.incrementAndGet();
View Full Code Here

    }

    @Test
    public void testCanPostExpenseReportsFromADirectory() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        EventCallback callback = new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component)
                    throws Exception
            {
                latch.countDown();
View Full Code Here

    @Test
    public void testCanPostExpenses() throws Exception {
        FileUtils.writeStringToFile(new File("./data/expenses/in", "expenses.xls"), "a crazy bar tab");
        final CountDownLatch latch = new CountDownLatch(1);
        EventCallback callback = new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component)
                    throws Exception
            {
                latch.countDown();
View Full Code Here

TOP

Related Classes of org.mule.tck.functional.EventCallback

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.