diff options
author | Dominik <dominik@dominikschuermann.de> | 2012-03-09 16:27:29 +0100 |
---|---|---|
committer | Dominik <dominik@dominikschuermann.de> | 2012-03-09 16:27:29 +0100 |
commit | 8452fb62b7d80c297395a8d12acd55a0375bff44 (patch) | |
tree | a05f61cf17bb9c58dd4043b465c038b86a8dd685 /src/org/apg/KeyServer.java | |
parent | df6933bfb83e131f9ed66c35cfdb0cb6268bc480 (diff) | |
download | open-keychain-8452fb62b7d80c297395a8d12acd55a0375bff44.tar.gz open-keychain-8452fb62b7d80c297395a8d12acd55a0375bff44.tar.bz2 open-keychain-8452fb62b7d80c297395a8d12acd55a0375bff44.zip |
renaming whole package to org.apg to simplifiy name
Diffstat (limited to 'src/org/apg/KeyServer.java')
-rw-r--r-- | src/org/apg/KeyServer.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/org/apg/KeyServer.java b/src/org/apg/KeyServer.java new file mode 100644 index 000000000..32158454f --- /dev/null +++ b/src/org/apg/KeyServer.java @@ -0,0 +1,46 @@ +package org.apg; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Vector; + +public abstract class KeyServer { + static public class QueryException extends Exception { + private static final long serialVersionUID = 2703768928624654512L; + + public QueryException(String message) { + super(message); + } + } + + static public class TooManyResponses extends Exception { + private static final long serialVersionUID = 2703768928624654513L; + } + + static public class InsufficientQuery extends Exception { + private static final long serialVersionUID = 2703768928624654514L; + } + + static public class AddKeyException extends Exception { + private static final long serialVersionUID = -507574859137295530L; + } + + static public class KeyInfo implements Serializable { + private static final long serialVersionUID = -7797972113284992662L; + public Vector<String> userIds; + public String revoked; + public Date date; + public String fingerPrint; + public long keyId; + public int size; + public String algorithm; + } + + abstract List<KeyInfo> search(String query) throws QueryException, TooManyResponses, + InsufficientQuery; + + abstract String get(long keyId) throws QueryException; + + abstract void add(String armouredText) throws AddKeyException; +} |