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.module.management.agent;
8   
9   import org.mule.config.i18n.Message;
10  import org.mule.module.management.ManagementException;
11  
12  import javax.management.ObjectName;
13  
14  /**
15   * <code>JmxManagementException</code> is thrown by the Jmx agents if an error
16   * occurs while executing an operation.
17   */
18  public class JmxManagementException extends ManagementException
19  {
20      /**
21       * Serial version
22       */
23      private static final long serialVersionUID = 7912469454512394420L;
24  
25      private ObjectName objectName;
26  
27      /**
28       * @param message the exception message
29       */
30      public JmxManagementException(Message message)
31      {
32          super(message);
33      }
34  
35      /**
36       * @param message the exception message
37       * @param cause the exception that cause this exception to be thrown
38       */
39      public JmxManagementException(Message message, Throwable cause)
40      {
41          super(message, cause);
42      }
43  
44      /**
45       * @param message the exception message
46       */
47      public JmxManagementException(Message message, ObjectName objectName)
48      {
49          super(message);
50          this.objectName = objectName;
51      }
52  
53      /**
54       * @param message the exception message
55       * @param cause the exception that cause this exception to be thrown
56       */
57      public JmxManagementException(Message message, ObjectName objectName, Throwable cause)
58      {
59          super(message, cause);
60          this.objectName = objectName;
61  
62      }
63  
64      public JmxManagementException(Throwable cause)
65      {
66          super(cause);
67      }
68  
69      public ObjectName getObjectName()
70      {
71          return objectName;
72      }
73  }