Add “fatal” flag.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Mar 2009 15:20:16 +0000 (16:20 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Mar 2009 15:20:16 +0000 (16:20 +0100)
src/net/pterodactylus/fcp/GetFailed.java

index 161da9e..095c82e 100644 (file)
@@ -143,6 +143,17 @@ public class GetFailed extends BaseMessage {
        }
 
        /**
+        * Returns whether the request failed fatally. If a request fails fatally it
+        * can never complete, even with inifinite retries.
+        *
+        * @return <code>true</code> if the request failed fatally,
+        *         <code>false</code> otherwise
+        */
+       public boolean isFatal() {
+               return Boolean.valueOf(getField("Fatal"));
+       }
+
+       /**
         * Returns a list of complex error codes with the message. Use
         * {@link #getComplexErrorDescription(int)} and
         * {@link #getComplexErrorCount(int)} to get details.