APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.provider.certpath

public Class BuildStep

extends Object
Class Inheritance
Imports
java.security.cert.X509Certificate

Describes one step of a certification path build, consisting of a Vertex state description, a certificate, a possible throwable, and a result code.
Author
Anne Anderson
Since
1.4
See Also
sun.security.provider.certpath.Vertex

Field Summary

Modifier and TypeField and Description
public static final int
BACK

result code associated with a certificate that was tried, but that represents an unsuccessful path, so the certificate has been backed out to allow backtracking to the next possible path.

private X509Certificate
public static final int
FAIL

result code associated with a certificate that represents the end of the last possible path, where no path successfully reached the target.

public static final int
FOLLOW

result code associated with a certificate that successfully continues the current path, but does not yet reach the target.

public static final int
POSSIBLE

result code associated with a certificate that may continue a path from the current certificate.

private final int
public static final int
SUCCEED

result code associated with a certificate that represents the end of a path that successfully reaches the target.

private Throwable
private final Vertex

Constructor Summary

AccessConstructor and Description
public
BuildStep(Vertex
description of the vertex at this step
vtx
,
int
result, where result is one of POSSIBLE, BACK, FOLLOW, FAIL, SUCCEED
res
)

construct a BuildStep

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

String
fullToString
()

return a string representation of this build step, including all possible detail of the vertex state, but not including the certificate contents.

public X509Certificate

Returns:

X509Certificate
getCertificate
()

return the certificate associated with this build step

public String

Returns:

String form of issuer name or null, if no certificate.
getIssuerName
()

return string form of issuer name from certificate associated with this build step

public String

Returns:

String form of issuer name or defaultName, if no certificate or exception received while trying to extract issuer name from certificate.
getIssuerName
(String
name to use as default if unable to return an issuer name from the certificate, or if no certificate.
defaultName
)

return string form of issuer name from certificate associated with this build step, or a default name if no certificate associated with this build step, or if issuer name could not be obtained from the certificate.

public int

Returns:

int result code
getResult
()

return the result code associated with this build step.

public String

Returns:

String form of subject name or null, if no certificate.
getSubjectName
()

return string form of subject name from certificate associated with this build step.

public String

Returns:

String form of subject name or defaultName, if no certificate or if an exception was received while attempting to extract the subject name from the certificate.
getSubjectName
(String
name to use as default if unable to return a subject name from the certificate, or if no certificate.
defaultName
)

return string form of subject name from certificate associated with this build step, or a default name if no certificate associated with this build step, or if subject name could not be obtained from the certificate.

public Throwable

Returns:

Throwable
getThrowable
()

return the exception associated with this build step.

public Vertex

Returns:

Vertex
getVertex
()

return vertex description for this build step

public String

Returns:

String string representing meaning of the result code
resultToString
(int
result code
res
)

return a string representing the meaning of the result code associated with this build step.

public String

Returns:

String
toString
()

Overrides java.lang.Object.toString.

return a string representation of this build step, showing minimal detail.

public String

Returns:

String
verboseToString
()

return a string representation of this build step, showing all detail of the vertex state appropriate to the result of this build step, and the certificate contents.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

BACKback to summary
public static final int BACK

result code associated with a certificate that was tried, but that represents an unsuccessful path, so the certificate has been backed out to allow backtracking to the next possible path.

certback to summary
private X509Certificate cert
FAILback to summary
public static final int FAIL

result code associated with a certificate that represents the end of the last possible path, where no path successfully reached the target.

FOLLOWback to summary
public static final int FOLLOW

result code associated with a certificate that successfully continues the current path, but does not yet reach the target.

POSSIBLEback to summary
public static final int POSSIBLE

result code associated with a certificate that may continue a path from the current certificate.

resultback to summary
private final int result
SUCCEEDback to summary
public static final int SUCCEED

result code associated with a certificate that represents the end of a path that successfully reaches the target.

throwableback to summary
private Throwable throwable
vertexback to summary
private final Vertex vertex

Constructor Detail

BuildStepback to summary
public BuildStep(Vertex vtx, int res)

construct a BuildStep

Parameters
vtx:Vertex

description of the vertex at this step

res:int

result, where result is one of POSSIBLE, BACK, FOLLOW, FAIL, SUCCEED

Method Detail

fullToStringback to summary
public String fullToString()

return a string representation of this build step, including all possible detail of the vertex state, but not including the certificate contents.

Returns:String

String

getCertificateback to summary
public X509Certificate getCertificate()

return the certificate associated with this build step

Returns:X509Certificate

X509Certificate

getIssuerNameback to summary
public String getIssuerName()

return string form of issuer name from certificate associated with this build step

Returns:String

String form of issuer name or null, if no certificate.

getIssuerNameback to summary
public String getIssuerName(String defaultName)

return string form of issuer name from certificate associated with this build step, or a default name if no certificate associated with this build step, or if issuer name could not be obtained from the certificate.

Parameters
defaultName:String

name to use as default if unable to return an issuer name from the certificate, or if no certificate.

Returns:String

String form of issuer name or defaultName, if no certificate or exception received while trying to extract issuer name from certificate.

getResultback to summary
public int getResult()

return the result code associated with this build step. The result codes are POSSIBLE, FOLLOW, BACK, FAIL, SUCCEED.

Returns:int

int result code

getSubjectNameback to summary
public String getSubjectName()

return string form of subject name from certificate associated with this build step.

Returns:String

String form of subject name or null, if no certificate.

getSubjectNameback to summary
public String getSubjectName(String defaultName)

return string form of subject name from certificate associated with this build step, or a default name if no certificate associated with this build step, or if subject name could not be obtained from the certificate.

Parameters
defaultName:String

name to use as default if unable to return a subject name from the certificate, or if no certificate.

Returns:String

String form of subject name or defaultName, if no certificate or if an exception was received while attempting to extract the subject name from the certificate.

getThrowableback to summary
public Throwable getThrowable()

return the exception associated with this build step.

Returns:Throwable

Throwable

getVertexback to summary
public Vertex getVertex()

return vertex description for this build step

Returns:Vertex

Vertex

resultToStringback to summary
public String resultToString(int res)

return a string representing the meaning of the result code associated with this build step.

Parameters
res:int

result code

Returns:String

String string representing meaning of the result code

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

return a string representation of this build step, showing minimal detail.

Returns:String

String

Annotations
@Override
verboseToStringback to summary
public String verboseToString()

return a string representation of this build step, showing all detail of the vertex state appropriate to the result of this build step, and the certificate contents.

Returns:String

String