com.rsa.certj.provider.db

Class MemoryDB

java.lang.Object
  |
  +--com.rsa.certj.Provider
        |
        +--com.rsa.certj.provider.db.MemoryDB

public final class MemoryDB
extends Provider

This class implements a database service provider that stores entries in memory. The application can supply the Vector objects used by the database, or the database can create temporary Vector objects. Databases of this type can be useful in caching, or in processing lists of certificates, CRLs, or private keys returned by other Cert-J methods. The stored copy of the private key is not encrypted.

Copyright © RSA Security Inc., 1999-2001. All rights reserved.


Constructor Summary

MemoryDB(String name)

Constructs a MemoryDB object with the provider name, name.

MemoryDB(String name, Vector certificates, Vector crls, Vector privateKeys, Vector publicKeys)

Constructs a MemoryDB object and initializes its certificate store, CRL store, and key store with the Vector objects given by the corresponding arguments.

 

Method Summary

 ProviderImplementation

instantiate(CertJ certJ)

Creates a ProviderImplementation object that handles in-memory database SPI methods.

 
Methods inherited from class com.rsa.certj.Provider
getName, getType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryDB

public MemoryDB(String name)
         throws InvalidParameterException
Constructs a MemoryDB object with the provider name, name.

Parameters

         name  

A String indicating the name of the provider.

Throws

InvalidParameterException - If name argument is invalid.

MemoryDB

public MemoryDB(String name,
                Vector certificates,
                Vector crls,
                Vector privateKeys,
                Vector publicKeys)
         throws InvalidParameterException
Constructs a MemoryDB object and initializes its certificate store, CRL store, and key store with the Vector objects given by the corresponding arguments.

Parameters

         name  

A String indicating the name of the provider.

         certificates  

A Vector to be used as certificate store.

         crls  

A Vector to be used as CRL store.

         privateKeys  

A Vector to be used as private-key store.

         publicKeys  

A Vector to be used as public-key store.

Throws

InvalidParameterException - If the name argument is invalid or privateKeys and publicKeys are not the same size.
Method Detail

instantiate

public ProviderImplementation instantiate(CertJ certJ)
                                   throws ProviderManagementException
Creates a ProviderImplementation object that handles in-memory database SPI methods. This method is called by CertJ.registerService when an object of the MemoryDB class is being registered; applications do not have to call this method.

Overrides

instantiate in class Provider

Parameters

         certJ  

A CertJ object for which the created provider is registered.

Returns

A ProviderImplementation object that handles the in-memory database SPI implementations.

Throws

ProviderManagementException - If instantiation of the in-memory provider fails.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000