public class PrivateKeyCallback extends Object implements Callback
| Modifier and Type | Class and Description | 
|---|---|
| static class  | PrivateKeyCallback.AliasRequestRequest type for private keys that are identified using an alias. | 
| static class  | PrivateKeyCallback.DigestRequestRequest type for private keys that are identified using a
 certificate digest or thumbprint. | 
| static class  | PrivateKeyCallback.IssuerSerialNumRequestRequest type for private keys that are identified using an
 issuer/serial number. | 
| static interface  | PrivateKeyCallback.RequestMarker interface for private key request types. | 
| static class  | PrivateKeyCallback.SubjectKeyIDRequestRequest type for private keys that are identified using a SubjectKeyID | 
| Constructor and Description | 
|---|
| PrivateKeyCallback(PrivateKeyCallback.Request request)Constructs this PrivateKeyCallback with a private key Request object. | 
| Modifier and Type | Method and Description | 
|---|---|
| Certificate[] | getChain()Used to obtain the certicicate chain set within the Callback. | 
| PrivateKey | getKey()Used to obtain the private key set within the Callback. | 
| PrivateKeyCallback.Request | getRequest()Used by the CallbackHandler to
 get the Request object that identifies the private key to be returned. | 
| void | setKey(PrivateKey key,
      Certificate[] chain)Used by the CallbackHandler to set the requested private key and
 the corresponding certificate chain within the Callback. | 
public PrivateKeyCallback(PrivateKeyCallback.Request request)
The request object identifies the private key to be returned. The corresponding certificate chain for the private key is also returned.
If the request object is null, the handler of the callback relies on its own default.
request - Identifier for the private key, or null.public PrivateKeyCallback.Request getRequest()
public void setKey(PrivateKey key, Certificate[] chain)
If the requested private key or chain could not be found, then both values must be set to null.
key - The private key, or null.chain - The corresponding certificate chain, or null.public PrivateKey getKey()
public Certificate[] getChain()
Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.