KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > provider > MessageTypeNotSupportedException


1 /*
2  * $Id: MessageTypeNotSupportedException.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.umo.provider;
12
13 import org.mule.config.i18n.Message;
14 import org.mule.config.i18n.Messages;
15 import org.mule.umo.MessagingException;
16
17 /**
18  * <code>MessageTypeNotSupportedException</code> is thrown when a message payload
19  * is set on a Message implementation of MessageAdapter which is not of supported
20  * type for that message or adapter.
21  *
22  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
23  * @version $Revision: 3798 $
24  */

25
26 public class MessageTypeNotSupportedException extends MessagingException
27 {
28     /**
29      * Serial version
30      */

31     private static final long serialVersionUID = -3954838511333933643L;
32
33     public MessageTypeNotSupportedException(Object JavaDoc message, Class JavaDoc adapterClass)
34     {
35         super(new Message(Messages.MESSAGE_X_NOT_SUPPORTED_BY_ADAPTER_X, (message != null
36                         ? message.getClass().getName() : "null"), (adapterClass != null
37                         ? adapterClass.getName() : "null class")), message);
38     }
39
40     public MessageTypeNotSupportedException(Object JavaDoc message, Class JavaDoc adapterClass, Throwable JavaDoc cause)
41     {
42         super(new Message(Messages.MESSAGE_X_NOT_SUPPORTED_BY_ADAPTER_X, (message != null
43                         ? message.getClass().getName() : "null"), (adapterClass != null
44                         ? adapterClass.getName() : "null class")), message, cause);
45     }
46
47 }
48
Popular Tags