01: /*
02: * $Id: MessageTypeNotSupportedException.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.transport;
12:
13: import org.mule.api.MessagingException;
14: import org.mule.config.i18n.CoreMessages;
15:
16: /**
17: * <code>MessageTypeNotSupportedException</code> is thrown when a message payload
18: * is set on a Message implementation of MessageAdapter which is not of supported
19: * type for that message or adapter.
20: */
21:
22: public class MessageTypeNotSupportedException extends
23: MessagingException {
24: /**
25: * Serial version
26: */
27: private static final long serialVersionUID = -3954838511333933643L;
28:
29: public MessageTypeNotSupportedException(Object message,
30: Class adapterClass) {
31: super (CoreMessages.messageNotSupportedByAdapter(
32: (message != null ? message.getClass().getName()
33: : "null"), (adapterClass != null ? adapterClass
34: .getName() : "null class")), message);
35: }
36:
37: public MessageTypeNotSupportedException(Object message,
38: Class adapterClass, Throwable cause) {
39: super (CoreMessages.messageNotSupportedByAdapter(
40: (message != null ? message.getClass().getName()
41: : "null"), (adapterClass != null ? adapterClass
42: .getName() : "null class")), message, cause);
43: }
44: }
|