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