View Javadoc

1   /*
2    * $Id: ProcessIfStartedWaitIfSyncPausedMessageProcessor.java 20320 2010-11-24 15:03:31Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.lifecycle.processor;
12  
13  import org.mule.api.MuleEvent;
14  import org.mule.api.MuleException;
15  import org.mule.api.lifecycle.LifecycleState;
16  import org.mule.api.lifecycle.Startable;
17  
18  public class ProcessIfStartedWaitIfSyncPausedMessageProcessor extends
19      ProcessIfStartedWaitIfPausedMessageProcessor
20  {
21  
22      public ProcessIfStartedWaitIfSyncPausedMessageProcessor(Startable startable, LifecycleState lifecycleState)
23      {
24          super(startable, lifecycleState);
25      }
26  
27      @Override
28      protected MuleEvent processNext(MuleEvent event) throws MuleException
29      {
30          if (event.getEndpoint().getExchangePattern().hasResponse())
31          {
32              return super.processNext(event);
33          }
34          else
35          {
36              return next.process(event);
37          }
38      }
39  
40  }