View Javadoc
1 package jsdsi; 2 3 import java.security.GeneralSecurityException; 4 5 /*** 6 * The result of a call to the cert path validator: returns true to 7 * isOk() if successful; otherwise getCause() returns the cause of the 8 * failure. 9 * 10 * @see CertPathValidator 11 * 12 * @author Sameer Ajmani 13 * @version $Revision: 1.1.6.1 $ $Date: 2005/11/08 03:12:52 $ 14 */ 15 public class CertPathValidatorResult 16 implements java.security.cert.CertPathValidatorResult { 17 /*** 18 * The exception that has been thrown at the call to the cert path 19 * validator. 20 */ 21 GeneralSecurityException ex; 22 23 /*** 24 * Creates a new <code>CertPathValidatorResult</code> from a given 25 * <code>GeneralSecurityException</code>. 26 * 27 * @param e <code>GeneralSecurityException</code> to create the object 28 * from. 29 */ 30 public CertPathValidatorResult(GeneralSecurityException e) { 31 ex = e; 32 } 33 34 /*** 35 * Checks if the no exception has been used creating this 36 * <code>CertPathValidatorResult</code>. 37 * 38 * @return <code>true</code> if the exception that has been used for 39 * creating this <code>CertPathValidatorResult</code> was 40 * <code>null</code>, returns <code>false</code> otherwise. 41 */ 42 public boolean isOk() { 43 return (ex == null); 44 } 45 46 /*** 47 * Returns the exception that has been used creating this 48 * <code>CertPathValidatorResult</code>. 49 * 50 * @return the <code>GeneralSecurityException</code> that has been used for 51 * creating this <code>CertPathValidatorResult</code>. 52 */ 53 public GeneralSecurityException getCause() { 54 return ex; 55 } 56 57 /*** 58 * @see java.lang.Object#clone() 59 */ 60 public Object clone() { 61 return new CertPathValidatorResult(ex); 62 } 63 }

This page was automatically generated by Maven