private IdempotentMessageFilter idempotentMessageFilterFromFlow(final String flowName)
      throws Exception {
    final FlowConstruct flow = getFlowConstruct(flowName);
    assertTrue(flow instanceof Flow);

    final Flow simpleFlow = (Flow) flow;
    final List<MessageProcessor> processors = simpleFlow.getMessageProcessors();
    assertEquals(1, processors.size());

    final MessageProcessor firstMP = processors.get(0);
    assertEquals(IdempotentMessageFilter.class, firstMP.getClass());

    return (IdempotentMessageFilter) firstMP;
  }
Ejemplo n.º 2
0
    public void onNotification(MessageProcessorNotification notification) {
      if (notification.getAction() == MessageProcessorNotification.MESSAGE_PROCESSOR_PRE_INVOKE) {
        MuleMessage message = notification.getSource().getMessage();
        if (getHandler().isClientConnected() && getHandler().isDebuggingThisMessage(message)) {

          ExpressionManager expressionManager = context.getExpressionManager();
          MessageProcessor processor = notification.getProcessor();
          if (!MESSAGE_PROCESSOR_NAMES_BLACK_LIST.contains(processor.getClass().getName())) {
            getHandler()
                .messageArrived(
                    new MuleDebuggingContext(
                        message,
                        expressionManager,
                        Thread.currentThread().getContextClassLoader(),
                        processor));
          }
        }
      }
    }