X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FFcpListener.java;h=aa8147bb2777b143ee1bc8f372d1e3ec01d90d3e;hb=3b855e85f744b958b5aa74a5a7bb33e76fdee57e;hp=21caa9c0c4af8017cc673df639a1eadf474433b2;hpb=84c226bae470c8779ae699d7b0f50bfe196b450c;p=jSite2.git diff --git a/src/net/pterodactylus/util/fcp/FcpListener.java b/src/net/pterodactylus/util/fcp/FcpListener.java index 21caa9c..aa8147b 100644 --- a/src/net/pterodactylus/util/fcp/FcpListener.java +++ b/src/net/pterodactylus/util/fcp/FcpListener.java @@ -21,8 +21,6 @@ package net.pterodactylus.util.fcp; import java.util.EventListener; -import net.pterodactylus.util.fcp.message.CloseConnectionDuplicateClientName; -import net.pterodactylus.util.fcp.message.NodeHello; /** * Interface for objects that want to be notified on certain FCP events. @@ -33,7 +31,7 @@ import net.pterodactylus.util.fcp.message.NodeHello; public interface FcpListener extends EventListener { /** - * Notifies listeners that a “NodeHello” message was received. + * Notifies a listener that a “NodeHello” message was received. * * @param fcpConnection * The connection that received the message @@ -43,8 +41,8 @@ public interface FcpListener extends EventListener { public void receivedNodeHello(FcpConnection fcpConnection, NodeHello nodeHello); /** - * Notifies all listeners that a “CloseConnectionDuplicateClientName” - * message was received. + * Notifies a listener that a “CloseConnectionDuplicateClientName” message + * was received. * * @param fcpConnection * The connection that received the message @@ -54,7 +52,57 @@ public interface FcpListener extends EventListener { public void receivedCloseConnectionDuplicateClientName(FcpConnection fcpConnection, CloseConnectionDuplicateClientName closeConnectionDuplicateClientName); /** - * Notifies listeners that a message has been received. This method is only + * Notifies a listener that a “SSKKeypair” message was received. + * + * @param fcpConnection + * The connection that received themessage + * @param sskKeypair + * The “SSKKeypair” message + */ + public void receivedSSKKeypair(FcpConnection fcpConnection, SSKKeypair sskKeypair); + + /** + * Notifies a listener that a “Peer” message was received. + * + * @param fcpConnection + * The connection that received the message + * @param peer + * The “Peer” message + */ + public void receivedPeer(FcpConnection fcpConnection, Peer peer); + + /** + * Notifies a listener that an “EndListPeers” message was received. + * + * @param fcpConnection + * The connection that recevied the message + * @param endListPeers + * The “EndListPeers” message + */ + public void receivedEndListPeers(FcpConnection fcpConnection, EndListPeers endListPeers); + + /** + * Notifies a listener that a “PeerNote” message was received. + * + * @param fcpConnection + * The connection that received the message + * @param peerNote + * The “PeerNote” message + */ + public void receviedPeerNote(FcpConnection fcpConnection, PeerNote peerNote); + + /** + * Notifies a listener that an “EndListPeerNotes” message was received. + * + * @param fcpConnection + * The connection that received the message + * @param endListPeerNotes + * The “EndListPeerNotes” message + */ + public void receivedEndListPeerNotes(FcpConnection fcpConnection, EndListPeerNotes endListPeerNotes); + + /** + * Notifies a listener that a message has been received. This method is only * called if {@link FcpConnection#handleMessage(FcpMessage)} does not * recognize the message. Should that ever happen, please file a bug report! *