From de8f04e22acbe5a1ffe77d099c9040e89f15ebdc Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Fri, 6 May 2016 17:29:39 +0200 Subject: [PATCH] Added warning to Labeler for developers who want to implement it. --- core/src/main/java/ch/dissem/bitmessage/ports/Labeler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/ch/dissem/bitmessage/ports/Labeler.java b/core/src/main/java/ch/dissem/bitmessage/ports/Labeler.java index 5e52845..e79bee2 100644 --- a/core/src/main/java/ch/dissem/bitmessage/ports/Labeler.java +++ b/core/src/main/java/ch/dissem/bitmessage/ports/Labeler.java @@ -20,6 +20,8 @@ import ch.dissem.bitmessage.entity.Plaintext; /** * Defines and sets labels. Note that it should also update the status field of a message. + * Generally it's highly advised to override the {@link DefaultLabeler} whenever possible, + * instead of directly implementing the interface. *

* As the labeler gets called whenever the state of a message changes, it can also be used * as a listener. @@ -35,6 +37,10 @@ public interface Labeler { void markAsDraft(Plaintext msg); + /** + * It is paramount that this methods marks the {@link Plaintext} object with status + * {@link Plaintext.Status#PUBKEY_REQUESTED} (see {@link DefaultLabeler}) + */ void markAsSending(Plaintext msg); void markAsSent(Plaintext msg);