orca.sharp.plugins.keys
Class SimpleKeyManager

java.lang.Object
  extended by orca.sharp.plugins.keys.SimpleKeyManager
All Implemented Interfaces:
KeyManager, IInitialize, IRecover, ISerialize

public class SimpleKeyManager
extends java.lang.Object
implements KeyManager


Field Summary
protected  ClientDatabase db
           
protected  LoggingTool logger
           
 
Constructor Summary
SimpleKeyManager()
           
SimpleKeyManager(ClientDatabase db)
           
 
Method Summary
 void addClient(Client c)
           
 void addPublicKey(AuthToken token, java.security.PublicKey key)
           
 Client getClient(AuthToken token)
           
 Client[] getClients()
           
 java.security.PublicKey getPublicKey(AuthToken token)
           
 void initialize()
          Initializes the object.
 void reset(java.util.Properties p)
          De-serializes the object from the given properties list.
 void revisit(IActor actor, java.util.Properties p)
          Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to.
 java.util.Properties save()
          Serializes the object into a properties list.
 void save(java.util.Properties p)
          Serializes the object into the given properties list.
 void setDatabase(ClientDatabase db)
           
 void setLogger(LoggingTool logger)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected LoggingTool logger

db

protected ClientDatabase db
Constructor Detail

SimpleKeyManager

public SimpleKeyManager()

SimpleKeyManager

public SimpleKeyManager(ClientDatabase db)
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Description copied from interface: IInitialize
Initializes the object.

Specified by:
initialize in interface IInitialize
Throws:
java.lang.Exception

save

public java.util.Properties save()
                          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into a properties list.

Specified by:
save in interface ISerialize
Returns:
properties list representing this object
Throws:
java.lang.Exception

save

public void save(java.util.Properties p)
          throws java.lang.Exception
Description copied from interface: ISerialize
Serializes the object into the given properties list.

Specified by:
save in interface ISerialize
Parameters:
p - properties list to serialize the object into
Throws:
java.lang.Exception

reset

public void reset(java.util.Properties p)
           throws java.lang.Exception
Description copied from interface: ISerialize
De-serializes the object from the given properties list.

Specified by:
reset in interface ISerialize
Parameters:
p - properties list containing the serialized version of the object
Throws:
java.lang.Exception

revisit

public void revisit(IActor actor,
                    java.util.Properties p)
             throws java.lang.Exception
Description copied from interface: IRecover
Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to. The component can use the actor object to access other objects necessary for its complete recovery.

Specified by:
revisit in interface IRecover
Parameters:
actor - actor object the component belongs to
p - properties list containing configuration data about the component
Throws:
java.lang.Exception

getClient

public Client getClient(AuthToken token)
Specified by:
getClient in interface KeyManager

getClients

public Client[] getClients()
Specified by:
getClients in interface KeyManager

getPublicKey

public java.security.PublicKey getPublicKey(AuthToken token)
Specified by:
getPublicKey in interface KeyManager

addClient

public void addClient(Client c)
               throws java.lang.Exception
Specified by:
addClient in interface KeyManager
Throws:
java.lang.Exception

addPublicKey

public void addPublicKey(AuthToken token,
                         java.security.PublicKey key)
Specified by:
addPublicKey in interface KeyManager

setDatabase

public void setDatabase(ClientDatabase db)
Specified by:
setDatabase in interface KeyManager

setLogger

public void setLogger(LoggingTool logger)
Specified by:
setLogger in interface KeyManager


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.