cryptix.pgp
Class KeyClient

java.lang.Object
  |
  +--cryptix.pgp.KeyStore
        |
        +--cryptix.pgp.KeyClient
Direct Known Subclasses:
WebClient

public abstract class KeyClient
extends KeyStore

Superclass for the classes that fetch keys from keyservers.

Next version will cache keys, within and between sessions.

WebClient is the only class which currently extends this. Others can be easily written - they simply need to implement the fetch() function.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.1.1.1 $

Since:
Cryptix 2.2
Author:
Ian Brown, Zoran Rajic

Field Summary
protected  int port
           
protected  java.lang.String serverName
           
 
Constructor Summary
protected KeyClient(java.lang.String name, int port)
          Set up variables for server connection.
 
Method Summary
protected abstract  PublicKey fetch(EmailAddress address)
           
protected abstract  PublicKey fetch(EmailAddress address, KeyID keyID)
           
protected abstract  PublicKey fetch(java.lang.String userName)
          fetch() is overridden by child classes to provide the 'meat' of these classes.
 PublicKey getKey(EmailAddress address)
           
 PublicKey getKey(EmailAddress address, KeyID keyID)
           
 PublicKey getKey(KeyID keyID)
           
 PublicKey getKey(java.lang.String userName)
           
abstract  java.lang.String getUserName(KeyID keyID)
           
 
Methods inherited from class cryptix.pgp.KeyStore
checkSignature, checkSignature, checkSignature
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverName

protected java.lang.String serverName

port

protected int port
Constructor Detail

KeyClient

protected KeyClient(java.lang.String name,
                    int port)
             throws java.io.IOException,
                    java.net.UnknownHostException
Set up variables for server connection.
Method Detail

getKey

public PublicKey getKey(java.lang.String userName)
                 throws java.io.IOException
Overrides:
getKey in class KeyStore

getKey

public PublicKey getKey(EmailAddress address)
                 throws java.io.IOException

getKey

public PublicKey getKey(EmailAddress address,
                        KeyID keyID)
                 throws java.io.IOException

getKey

public PublicKey getKey(KeyID keyID)
                 throws java.io.IOException
Overrides:
getKey in class KeyStore

fetch

protected abstract PublicKey fetch(java.lang.String userName)
                            throws java.io.IOException
fetch() is overridden by child classes to provide the 'meat' of these classes.

fetch

protected abstract PublicKey fetch(EmailAddress address,
                                   KeyID keyID)
                            throws java.io.IOException

fetch

protected abstract PublicKey fetch(EmailAddress address)
                            throws java.io.IOException

getUserName

public abstract java.lang.String getUserName(KeyID keyID)