X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2Fhighlevel%2FHighLevelResult.java;h=3be5b2cbab6eed2bc471b9264149b35d89372bc6;hb=fdef33f54a71c55f3c3af626a5daf4c2ae517471;hp=b61036e53532e419bf9a9cfee4779bc0703580b8;hpb=93f4e8ef160a101863eb57beae7c84b381fa4bba;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/highlevel/HighLevelResult.java b/src/net/pterodactylus/fcp/highlevel/HighLevelResult.java index b61036e..3be5b2c 100644 --- a/src/net/pterodactylus/fcp/highlevel/HighLevelResult.java +++ b/src/net/pterodactylus/fcp/highlevel/HighLevelResult.java @@ -20,13 +20,35 @@ 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 true if the operation failed, false + * otherwise + */ + public boolean isFailed() { + return failed; + } + + /** + * Sets whether the operation failed. + * + * @param failed + * true if the operation failed, + * false otherwise + */ + void setFailed(boolean failed) { + this.failed = failed; + } }