1. /*
  2. * @(#)JMXProviderException.java 1.11 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.management.remote;
  8. import java.io.IOException;
  9. import java.util.Map;
  10. /**
  11. * <p>Exception thrown by {@link JMXConnectorFactory} when a provider
  12. * exists for the required protocol but cannot be used for some
  13. * reason.</p>
  14. *
  15. * @see JMXConnectorFactory#connect(JMXServiceURL, Map)
  16. * @since 1.5
  17. * @since.unbundled 1.0
  18. */
  19. public class JMXProviderException extends IOException {
  20. private static final long serialVersionUID = -3166703627550447198L;
  21. /**
  22. * <p>Constructs a <code>JMXProviderException</code> with no
  23. * specified detail message.</p>
  24. */
  25. public JMXProviderException() {
  26. }
  27. /**
  28. * <p>Constructs a <code>JMXProviderException</code> with the
  29. * specified detail message.</p>
  30. *
  31. * @param message the detail message
  32. */
  33. public JMXProviderException(String message) {
  34. super(message);
  35. }
  36. /**
  37. * <p>Constructs a <code>JMXProviderException</code> with the
  38. * specified detail message and nested exception.</p>
  39. *
  40. * @param message the detail message
  41. * @param cause the nested exception
  42. */
  43. public JMXProviderException(String message, Throwable cause) {
  44. super(message);
  45. this.cause = cause;
  46. }
  47. public Throwable getCause() {
  48. return cause;
  49. }
  50. /**
  51. * @serial An exception that caused this exception to be thrown.
  52. * This field may be null.
  53. * @see #getCause()
  54. **/
  55. private Throwable cause = null;
  56. }