diff options
Diffstat (limited to 'src/org/thialfihar/android/apg/KeyServer.java')
-rw-r--r-- | src/org/thialfihar/android/apg/KeyServer.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/org/thialfihar/android/apg/KeyServer.java b/src/org/thialfihar/android/apg/KeyServer.java index 25ff26144..b31ace887 100644 --- a/src/org/thialfihar/android/apg/KeyServer.java +++ b/src/org/thialfihar/android/apg/KeyServer.java @@ -1,13 +1,23 @@ package org.thialfihar.android.apg; -import java.io.IOException; import java.io.Serializable; -import java.net.MalformedURLException; 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 KeyInfo implements Serializable { private static final long serialVersionUID = -7797972113284992662L; Vector<String> userIds; @@ -18,6 +28,6 @@ public abstract class KeyServer { int size; String algorithm; } - abstract List<KeyInfo> search(String query) throws MalformedURLException, IOException; - abstract String get(long keyId) throws MalformedURLException, IOException; + abstract List<KeyInfo> search(String query) throws QueryException, TooManyResponses, InsufficientQuery; + abstract String get(long keyId) throws QueryException; } |