add key generation
[jFCPlib.git] / src / net / pterodactylus / fcp / highlevel / HighLevelResult.java
index b61036e..3be5b2c 100644 (file)
 package net.pterodactylus.fcp.highlevel;
 
 /**
- * Marker interface for results of {@link HighLevelClient} operations.
+ * Base class for results of {@link HighLevelClient} operations.
  * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  * @version $Id$
  */
-public interface HighLevelResult {
+public abstract class HighLevelResult {
 
-       /* intentionally left blank. */
+       /** Whether the operation failed. */
+       private boolean failed;
+
+       /**
+        * Returns whether the operation failed.
+        * 
+        * @return <code>true</code> if the operation failed, <code>false</code>
+        *         otherwise
+        */
+       public boolean isFailed() {
+               return failed;
+       }
+
+       /**
+        * Sets whether the operation failed.
+        * 
+        * @param failed
+        *            <code>true</code> if the operation failed,
+        *            <code>false</code> otherwise
+        */
+       void setFailed(boolean failed) {
+               this.failed = failed;
+       }
 
 }