1. /*
  2. * @(#)CertPathBuilderSpi.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. import java.security.InvalidAlgorithmParameterException;
  9. /**
  10. * The <i>Service Provider Interface</i> (<b>SPI</b>)
  11. * for the {@link CertPathBuilder CertPathBuilder} class. All
  12. * <code>CertPathBuilder</code> implementations must include a class (the
  13. * SPI class) that extends this class (<code>CertPathBuilderSpi</code>) and
  14. * implements all of its methods. In general, instances of this class should
  15. * only be accessed through the <code>CertPathBuilder</code> class. For
  16. * details, see the Java Cryptography Architecture.
  17. * <p>
  18. * <b>Concurrent Access</b>
  19. * <p>
  20. * Instances of this class need not be protected against concurrent
  21. * access from multiple threads. Threads that need to access a single
  22. * <code>CertPathBuilderSpi</code> instance concurrently should synchronize
  23. * amongst themselves and provide the necessary locking before calling the
  24. * wrapping <code>CertPathBuilder</code> object.
  25. * <p>
  26. * However, implementations of <code>CertPathBuilderSpi</code> may still
  27. * encounter concurrency issues, since multiple threads each
  28. * manipulating a different <code>CertPathBuilderSpi</code> instance need not
  29. * synchronize.
  30. *
  31. * @version 1.4 01/23/03
  32. * @since 1.4
  33. * @author Sean Mullan
  34. */
  35. public abstract class CertPathBuilderSpi {
  36. /**
  37. * The default constructor.
  38. */
  39. public CertPathBuilderSpi() { }
  40. /**
  41. * Attempts to build a certification path using the specified
  42. * algorithm parameter set.
  43. *
  44. * @param params the algorithm parameters
  45. * @return the result of the build algorithm
  46. * @throws CertPathBuilderException if the builder is unable to construct
  47. * a certification path that satisfies the specified parameters
  48. * @throws InvalidAlgorithmParameterException if the specified parameters
  49. * are inappropriate for this <code>CertPathBuilder</code>
  50. */
  51. public abstract CertPathBuilderResult engineBuild(CertPathParameters params)
  52. throws CertPathBuilderException, InvalidAlgorithmParameterException;
  53. }