View Javadoc

1   /*
2    * $Id: JmxManagementException.java 7976 2007-08-21 14:26:13Z dirk.olmes $
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 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.management.agents;
12  
13  import org.mule.config.i18n.Message;
14  import org.mule.management.ManagementException;
15  
16  import javax.management.ObjectName;
17  
18  /**
19   * <code>JmxManagementException</code> is thrown by the Jmx agents if an error
20   * occurs while executing an operation
21   * 
22   * @author <a href="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
23   * @version $Revision: 7976 $
24   */
25  public class JmxManagementException extends ManagementException
26  {
27      /**
28       * Serial version
29       */
30      private static final long serialVersionUID = 7912469454512394420L;
31  
32      private ObjectName objectName;
33  
34      /**
35       * @param message the exception message
36       */
37      public JmxManagementException(Message message)
38      {
39          super(message);
40      }
41  
42      /**
43       * @param message the exception message
44       * @param cause the exception that cause this exception to be thrown
45       */
46      public JmxManagementException(Message message, Throwable cause)
47      {
48          super(message, cause);
49      }
50  
51      /**
52       * @param message the exception message
53       */
54      public JmxManagementException(Message message, ObjectName objectName)
55      {
56          super(message);
57          this.objectName = objectName;
58      }
59  
60      /**
61       * @param message the exception message
62       * @param cause the exception that cause this exception to be thrown
63       */
64      public JmxManagementException(Message message, ObjectName objectName, Throwable cause)
65      {
66          super(message, cause);
67          this.objectName = objectName;
68  
69      }
70  
71      public JmxManagementException(Throwable cause)
72      {
73          super(cause);
74      }
75  
76      public ObjectName getObjectName()
77      {
78          return objectName;
79      }
80  }