View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.processor;
8   
9   import org.mule.api.MuleEvent;
10  import org.mule.api.MuleException;
11  import org.mule.api.processor.MessageProcessor;
12  import org.mule.api.processor.MessageProcessorChain;
13  import org.mule.api.processor.policy.Policies;
14  import org.mule.util.ObjectUtils;
15  
16  import java.util.Collections;
17  import java.util.List;
18  
19  
20  public class NullMessageProcessor implements MessageProcessorChain
21  {
22      public MuleEvent process(MuleEvent event) throws MuleException
23      {
24          return event;
25      }
26  
27      @Override
28      public String toString()
29      {
30          return ObjectUtils.toString(this);
31      }
32  
33      public List<MessageProcessor> getMessageProcessors()
34      {
35          return Collections.emptyList();
36      }
37  
38      public String getName()
39      {
40          return null;
41      }
42  
43      public Policies getPolicies()
44      {
45          return new Policies(this);
46      }
47  }