1. /*
  2. * @(#)CertSelector.java 1.4 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 java.security.cert;
  8. /**
  9. * A selector that defines a set of criteria for selecting
  10. * <code>Certificate</code>s. Classes that implement this interface
  11. * are often used to specify which <code>Certificate</code>s should
  12. * be retrieved from a <code>CertStore</code>.
  13. * <p>
  14. * <b>Concurrent Access</b>
  15. * <p>
  16. * Unless otherwise specified, the methods defined in this interface are not
  17. * thread-safe. Multiple threads that need to access a single
  18. * object concurrently should synchronize amongst themselves and
  19. * provide the necessary locking. Multiple threads each manipulating
  20. * separate objects need not synchronize.
  21. *
  22. * @see Certificate
  23. * @see CertStore
  24. * @see CertStore#getCertificates
  25. *
  26. * @version 1.4 01/23/03
  27. * @author Steve Hanna
  28. * @since 1.4
  29. */
  30. public interface CertSelector extends Cloneable {
  31. /**
  32. * Decides whether a <code>Certificate</code> should be selected.
  33. *
  34. * @param cert the <code>Certificate</code> to be checked
  35. * @return <code>true</code> if the <code>Certificate</code>
  36. * should be selected, <code>false</code> otherwise
  37. */
  38. boolean match(Certificate cert);
  39. /**
  40. * Makes a copy of this <code>CertSelector</code>. Changes to the
  41. * copy will not affect the original and vice versa.
  42. *
  43. * @return a copy of this <code>CertSelector</code>
  44. */
  45. Object clone();
  46. }