1. /*
  2. * @(#)UnsupportedCallbackException.java 1.9 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.security.auth.callback;
  8. /**
  9. * Signals that a <code>CallbackHandler</code> does not
  10. * recognize a particular <code>Callback</code>.
  11. *
  12. * @version 1.9, 01/23/03
  13. */
  14. public class UnsupportedCallbackException extends Exception {
  15. /**
  16. * @serial
  17. */
  18. private Callback callback;
  19. /**
  20. * Constructs a <code>UnsupportedCallbackException</code>
  21. * with no detail message.
  22. *
  23. * <p>
  24. *
  25. * @param callback the unrecognized <code>Callback</code>.
  26. */
  27. public UnsupportedCallbackException(Callback callback) {
  28. super();
  29. this.callback = callback;
  30. }
  31. /**
  32. * Constructs a UnsupportedCallbackException with the specified detail
  33. * message. A detail message is a String that describes this particular
  34. * exception.
  35. *
  36. * <p>
  37. *
  38. * @param callback the unrecognized <code>Callback</code>. <p>
  39. *
  40. * @param msg the detail message.
  41. */
  42. public UnsupportedCallbackException(Callback callback, String msg) {
  43. super(msg);
  44. this.callback = callback;
  45. }
  46. /**
  47. * Get the unrecognized <code>Callback</code>.
  48. *
  49. * <p>
  50. *
  51. * @return the unrecognized <code>Callback</code>.
  52. */
  53. public Callback getCallback() {
  54. return callback;
  55. }
  56. }