fi.hut.tcm.repository
Class CertTable

java.lang.Object
  |
  +--fi.hut.tcm.repository.CertTable

class CertTable
extends java.lang.Object
implements java.io.Serializable

CertTable A CertTable is a class that stores SPKICertificates in an indexed form that can be searched efficiently. Unlike Hashtable, CertTable can store multiple values (SPKICertificates) per search key.

See Also:
Serialized Form

Field Summary
private  java.util.Hashtable hash
          The certificate vectors are stored in the hashtable.
 
Constructor Summary
CertTable()
          Creates a new CertTable.
 
Method Summary
 java.util.Vector get(java.lang.Object key)
          Gets the vector that is identified by the key.
 void put(java.lang.Object key, SPKICertificate cert)
          Checks if the key already exists in the hashtable, and if so, adds the certificate to the vector.
private  void readObject(java.io.ObjectInputStream in)
          Implements the Serializable interface.
 void remove(java.lang.Object key, SPKICertificate cert)
          Removes the certificate from the vector identified by the key.
private  void writeObject(java.io.ObjectOutputStream out)
          Implements the Serializable interface.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

hash

private java.util.Hashtable hash
The certificate vectors are stored in the hashtable.
Constructor Detail

CertTable

public CertTable()
Creates a new CertTable.
Method Detail

put

public void put(java.lang.Object key,
                SPKICertificate cert)
Checks if the key already exists in the hashtable, and if so, adds the certificate to the vector. If the key is new, creates a new vector and adds it to the hashtable.

get

public java.util.Vector get(java.lang.Object key)
Gets the vector that is identified by the key.

remove

public void remove(java.lang.Object key,
                   SPKICertificate cert)
Removes the certificate from the vector identified by the key.

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Implements the Serializable interface.

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Implements the Serializable interface.