All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ajanta.agent.ReadOnlyContainer

java.lang.Object
   |
   +----ajanta.agent.ReadOnlyContainer

public class ReadOnlyContainer
extends Object
A container for read-only data (constants) to be carried along by an agent. It is initialized by the agent's owner before the agent is launched, and cannot be subsequently modified without detection.

See Also:
AppendOnlyContainer, TargetedContainer

Variable Index

 o objs
the read-only objects being carried along with the agent

Constructor Index

 o ReadOnlyContainer(Vector, DSAPrivateKey)
Constructor requires the agent's creator to supply the private key which will be used to sign the read-only objects.

Method Index

 o verify(DSAPublicKey)
Checks whether this ReadOnlyContainer has been tampered with

Variables

 o objs
 public Vector objs
the read-only objects being carried along with the agent

Constructors

 o ReadOnlyContainer
 public ReadOnlyContainer(Vector objs,
                          DSAPrivateKey key) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, IOException
Constructor requires the agent's creator to supply the private key which will be used to sign the read-only objects. This key is not carried along by the agent, however.

Parameters:
objs - a vector of objects to be protected
key - the DSA private key to be used for signing
Throws: NoSuchAlgorithmException
If the current host does not support the DSA algorithm (with SHA as hash function)
Throws: InvalidKeyException
If an invalid key is supplied during object construction
Throws: SignatureException
If an error occurred during the signing process
Throws: IOException
If an IO error occurred while serializing the vector of objects being signed

Methods

 o verify
 public boolean verify(DSAPublicKey key) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, IOException
Checks whether this ReadOnlyContainer has been tampered with

Parameters:
key - The DSA public key for the agent
Throws: NoSuchAlgorithmException
If the current host does not support the DSA algorithm (with SHA as hash function)
Throws: InvalidKeyException
If an invalid key is supplied
Throws: SignatureException
If an error occurred during the verification process
Throws: IOException
If an IO error occurred while serializing the vector of objects to be verified

All Packages  Class Hierarchy  This Package  Previous  Next  Index