Package org.mule.context.notification

Examples of org.mule.context.notification.MessageProcessorNotification


    protected void fireNotification(FlowConstruct flowConstruct, MuleEvent event, MessageProcessor processor, int action)
    {
        if (notificationHandler != null
            && notificationHandler.isNotificationEnabled(MessageProcessorNotification.class))
        {
            notificationHandler.fireNotification(new MessageProcessorNotification(flowConstruct, event, processor, action));
        }
    }
View Full Code Here


        if (serverNotificationManager != null
            && serverNotificationManager.isNotificationEnabled(MessageProcessorNotification.class))
        {
            if (flowConstruct instanceof MessageProcessorPathResolver && ((MessageProcessorPathResolver) flowConstruct).getProcessorPath(processor) != null)
            {
                serverNotificationManager.fireNotification(new MessageProcessorNotification(flowConstruct, event, processor, exceptionThrown, action));
            }
        }
    }
View Full Code Here

                    }
                }).when(mockNotificationManager).fireNotification(Mockito.any(ServerNotification.class));
        MuleEvent result = messageProcessorNotificationExecutionInterceptor.execute(mockMessageProcessor, mockMuleEvent);
        assertThat(result, is(mockResultMuleEvent));
        assertThat(serverNotifications.size(),Is.is(2));
        MessageProcessorNotification beforeMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(0);
        MessageProcessorNotification afterMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(1);
        assertThat(beforeMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_PRE_INVOKE));
        assertThat(beforeMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
        assertThat(beforeMessageProcessorNotification.getExceptionThrown(), IsNull.nullValue());
        assertThat(afterMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_POST_INVOKE));
        assertThat(afterMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
        assertThat(afterMessageProcessorNotification.getExceptionThrown(), IsNull.nullValue());
    }
View Full Code Here

        }
        catch (MessagingException e)
        {
        }
        assertThat(serverNotifications.size(),Is.is(2));
        MessageProcessorNotification beforeMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(0);
        MessageProcessorNotification afterMessageProcessorNotification = (MessageProcessorNotification) serverNotifications.get(1);
        assertThat(beforeMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_PRE_INVOKE));
        assertThat(beforeMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
        assertThat(beforeMessageProcessorNotification.getExceptionThrown(), IsNull.nullValue());
        assertThat(afterMessageProcessorNotification.getAction(), is(MessageProcessorNotification.MESSAGE_PROCESSOR_POST_INVOKE));
        assertThat(afterMessageProcessorNotification.getProcessor(), is(mockMessageProcessor));
        assertThat(afterMessageProcessorNotification.getExceptionThrown(), Is.is(mockMessagingException));
    }
View Full Code Here

TOP

Related Classes of org.mule.context.notification.MessageProcessorNotification

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.