1. /*
  2. * @(#)RealmCallback.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.sasl;
  8. import javax.security.auth.callback.TextInputCallback;
  9. /**
  10. * This callback is used by <tt>SaslClient</tt> and <tt>SaslServer</tt>
  11. * to retrieve realm information.
  12. *
  13. * @since 1.5
  14. *
  15. * @author Rosanna Lee
  16. * @author Rob Weltman
  17. */
  18. public class RealmCallback extends TextInputCallback {
  19. /**
  20. * Constructs a <tt>RealmCallback</tt> with a prompt.
  21. *
  22. * @param prompt The non-null prompt to use to request the realm information.
  23. * @throws IllegalArgumentException If <tt>prompt</tt> is null or
  24. * the empty string.
  25. */
  26. public RealmCallback(String prompt) {
  27. super(prompt);
  28. }
  29. /**
  30. * Constructs a <tt>RealmCallback</tt> with a prompt and default
  31. * realm information.
  32. *
  33. * @param prompt The non-null prompt to use to request the realm information.
  34. * @param defaultRealmInfo The non-null default realm information to use.
  35. * @throws IllegalArgumentException If <tt>prompt</tt> is null or
  36. * the empty string,
  37. * or if <tt>defaultRealm</tt> is empty or null.
  38. */
  39. public RealmCallback(String prompt, String defaultRealmInfo) {
  40. super(prompt, defaultRealmInfo);
  41. }
  42. private static final long serialVersionUID = -4342673378785456908L;
  43. }