X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fcore%2FNodeListener.java;h=11989693ea2e83cbc9cabf3bcd2aadc3505b22d8;hb=8cc2883a3e6b701006a01cb9eb0bc116dfead5fe;hp=95254c185f00f5bd4d43832a40bc42d6145f879c;hpb=ebd531bc775036dd66a7e20abebbcb480af35491;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/core/NodeListener.java b/src/net/pterodactylus/jsite/core/NodeListener.java index 95254c1..1198969 100644 --- a/src/net/pterodactylus/jsite/core/NodeListener.java +++ b/src/net/pterodactylus/jsite/core/NodeListener.java @@ -25,7 +25,6 @@ import java.util.EventListener; * Interface for listeners that want to be notified about node events. * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ public interface NodeListener extends EventListener { @@ -54,8 +53,21 @@ public interface NodeListener extends EventListener { public void nodeConnected(Node node); /** - * Notifies a listener that a connection to the given node was severed. The - * listener is responsible for + * Notifies a listener that a connection to a node has failed. + * + * @param node + * The node that could not be connected + * @param cause + * The cause of the failure + */ + public void nodeConnectionFailed(Node node, Throwable cause); + + /** + * Notifies a listener that a connection to the given node was severed. If + * the listener needs the high-level client associated with the node for + * anything else (like deregistering as listener from it) it should retrieve + * the high-level client using {@link NodeManager#getHighLevelClient(Node)} + * before this method returns! * * @param node * The node that is now disconnected