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.test.integration.streaming;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.MuleMessage;
11  import org.mule.api.construct.FlowConstruct;
12  import org.mule.api.endpoint.InboundEndpoint;
13  import org.mule.api.lifecycle.CreateException;
14  import org.mule.api.transport.Connector;
15  import org.mule.transport.vm.VMMessageReceiver;
16  
17  public class ExceptionThrowingVMMessageReceiver extends VMMessageReceiver
18  {
19  
20      public ExceptionThrowingVMMessageReceiver(Connector connector, FlowConstruct flowConstruct, InboundEndpoint endpoint)
21          throws CreateException
22      {
23          super(connector, flowConstruct, endpoint);
24      }
25  
26      @Override
27      protected void processMessage(Object msg) throws Exception
28      {
29          throw new RuntimeException();
30      }
31  
32      @Override
33      public MuleMessage onCall(MuleMessage message) throws MuleException
34      {
35          throw new RuntimeException();
36      }
37  
38  }