View Javadoc

1   /*
2    * $Id: JmxManagementException.java 7963 2007-08-21 08:53:15Z 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  public class JmxManagementException extends ManagementException
23  {
24      /**
25       * Serial version
26       */
27      private static final long serialVersionUID = 7912469454512394420L;
28  
29      private ObjectName objectName;
30  
31      /**
32       * @param message the exception message
33       */
34      public JmxManagementException(Message message)
35      {
36          super(message);
37      }
38  
39      /**
40       * @param message the exception message
41       * @param cause the exception that cause this exception to be thrown
42       */
43      public JmxManagementException(Message message, Throwable cause)
44      {
45          super(message, cause);
46      }
47  
48      /**
49       * @param message the exception message
50       */
51      public JmxManagementException(Message message, ObjectName objectName)
52      {
53          super(message);
54          this.objectName = objectName;
55      }
56  
57      /**
58       * @param message the exception message
59       * @param cause the exception that cause this exception to be thrown
60       */
61      public JmxManagementException(Message message, ObjectName objectName, Throwable cause)
62      {
63          super(message, cause);
64          this.objectName = objectName;
65  
66      }
67  
68      public JmxManagementException(Throwable cause)
69      {
70          super(cause);
71      }
72  
73      public ObjectName getObjectName()
74      {
75          return objectName;
76      }
77  }