com.iplanet.trustbase.initiator.dsms
Interface MessageFactory


public interface MessageFactory

Message factories are responsible for building a CSC message, and for interpreting the reply.
Note that any implementation of MessageFactory MUST supply a public constructor taking a single argument of type ConfigAdapter. Failure to provide this constructor will result in an exception at run time.
All config information is picked up from the ConfigAdapter that is supplied to the MessageFactory implementation at construction time.


Method Summary
 MessageData buildMessage(java.security.cert.X509Certificate[] toCheck, boolean generateNonce, java.lang.StringBuffer nonceValue)
          Build a message, optionally signing it
 CertStatus[] parseMessage(java.security.cert.X509Certificate[] request, MessageData response, boolean forceProof)
          Interpret the results of a status check
 

Method Detail

buildMessage

public MessageData buildMessage(java.security.cert.X509Certificate[] toCheck,
                                boolean generateNonce,
                                java.lang.StringBuffer nonceValue)
                         throws CSCMessageException,
                                ConfigAdapterException
Build a message, optionally signing it
Parameters:
toCheck - the certificate chain whose leaf is the certificate to be checked
generateNonce - controls whether the message builder generates its own nonce.
nonceValue - if generateNonce is false then a nonce can be specified here.
Returns:
the MessageData, which comprises the message itself and the transaction ID
Throws:
CSCMessageException - if the message could not be built
ConfigAdapterException - if necessary config information could not be retrieved

parseMessage

public CertStatus[] parseMessage(java.security.cert.X509Certificate[] request,
                                 MessageData response,
                                 boolean forceProof)
                          throws CSCMessageException,
                                 ConfigAdapterException
Interpret the results of a status check
Parameters:
messageData - the response message from a responder
forceProof - forces the cert status's to be generated as freshness proofs.
Returns:
the status information
Throws:
CSCMessageException - if the message could not be parsed
ConfigAdapterException - if necessary config information could not be retrieved