View Javadoc

1   /*
2    * $Id: ExceptionThrowingVMMessageReceiver.java 19749 2010-09-28 04:37:54Z dirk.olmes $
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.test.integration.streaming;
12  
13  import org.mule.api.MuleException;
14  import org.mule.api.MuleMessage;
15  import org.mule.api.construct.FlowConstruct;
16  import org.mule.api.endpoint.InboundEndpoint;
17  import org.mule.api.lifecycle.CreateException;
18  import org.mule.api.transport.Connector;
19  import org.mule.transport.vm.VMMessageReceiver;
20  
21  public class ExceptionThrowingVMMessageReceiver extends VMMessageReceiver
22  {
23  
24      public ExceptionThrowingVMMessageReceiver(Connector connector, FlowConstruct flowConstruct, InboundEndpoint endpoint)
25          throws CreateException
26      {
27          super(connector, flowConstruct, endpoint);
28      }
29  
30      @Override
31      protected void processMessage(Object msg) throws Exception
32      {
33          throw new RuntimeException();
34      }
35  
36      @Override
37      public MuleMessage onCall(MuleMessage message) throws MuleException
38      {
39          throw new RuntimeException();
40      }
41  
42  }