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.endpoint;
8   
9   import org.mule.config.i18n.CoreMessages;
10  import org.mule.config.i18n.Message;
11  
12  /**
13   * <code>MalformedEndpointException</code> is thrown by the MuleEndpointURI class
14   * if it fails to parse a Url
15   * 
16   * @see org.mule.endpoint.MuleEndpointURI
17   */
18  
19  public class MalformedEndpointException extends EndpointException
20  {
21      /**
22       * Serial version
23       */
24      private static final long serialVersionUID = -3179045414716505094L;
25  
26      /**
27       * @param endpoint the endpoint that could not be parsed
28       */
29      public MalformedEndpointException(String endpoint)
30      {
31          super(CoreMessages.endpointIsMalformed(endpoint));
32      }
33  
34      /**
35       * @param endpoint the endpoint that could not be parsed
36       */
37      public MalformedEndpointException(Message message, String endpoint)
38      {
39          super(CoreMessages.endpointIsMalformed(endpoint).setNextMessage(message));
40      }
41  
42      /**
43       * @param endpoint the endpoint that could not be parsed
44       * @param cause the exception that cause this exception to be thrown
45       */
46      public MalformedEndpointException(String endpoint, Throwable cause)
47      {
48          super(CoreMessages.endpointIsMalformed(endpoint), cause);
49      }
50  
51      public MalformedEndpointException(Throwable cause)
52      {
53          super(cause);
54      }
55  }