1. /*
  2. * @(#)UnsupportedCallbackException.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.security.auth.callback;
  8. /**
  9. * Signals that a <code>CallbackHandler</code> does not
  10. * recognize a particular <code>Callback</code>.
  11. *
  12. * @version 1.11, 12/19/03
  13. */
  14. public class UnsupportedCallbackException extends Exception {
  15. private static final long serialVersionUID = -6873556327655666839L;
  16. /**
  17. * @serial
  18. */
  19. private Callback callback;
  20. /**
  21. * Constructs a <code>UnsupportedCallbackException</code>
  22. * with no detail message.
  23. *
  24. * <p>
  25. *
  26. * @param callback the unrecognized <code>Callback</code>.
  27. */
  28. public UnsupportedCallbackException(Callback callback) {
  29. super();
  30. this.callback = callback;
  31. }
  32. /**
  33. * Constructs a UnsupportedCallbackException with the specified detail
  34. * message. A detail message is a String that describes this particular
  35. * exception.
  36. *
  37. * <p>
  38. *
  39. * @param callback the unrecognized <code>Callback</code>. <p>
  40. *
  41. * @param msg the detail message.
  42. */
  43. public UnsupportedCallbackException(Callback callback, String msg) {
  44. super(msg);
  45. this.callback = callback;
  46. }
  47. /**
  48. * Get the unrecognized <code>Callback</code>.
  49. *
  50. * <p>
  51. *
  52. * @return the unrecognized <code>Callback</code>.
  53. */
  54. public Callback getCallback() {
  55. return callback;
  56. }
  57. }