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.api.transport;
8   
9   import org.mule.api.MuleException;
10  import org.mule.api.MuleMessage;
11  import org.mule.config.i18n.CoreMessages;
12  
13  /**
14   * <code>MessageTypeNotSupportedException</code> is thrown when a {@link MuleMessage} instance is 
15   * to be created with an payload type that is not of supported type by that 
16   * {@link MuleMessageFactory}.
17   */
18  public class MessageTypeNotSupportedException extends MuleException
19  {
20      private static final long serialVersionUID = -3954838511333933644L;
21  
22      public MessageTypeNotSupportedException(Object message, Class<?> creatorClass)
23      {
24          super(CoreMessages.messageNotSupportedByMuleMessageFactory(message, creatorClass));
25      }
26  
27      public MessageTypeNotSupportedException(Object message, Class<?> creatorClass, Throwable cause)
28      {
29          super(CoreMessages.messageNotSupportedByMuleMessageFactory(message, creatorClass), cause);
30      }
31  }