X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FFcpListener.java;h=8b2c6212e36e6d283b09f60b7b1d9d940b66332d;hb=a238aa37f5716eb715f18a37a436d3ca792e33b0;hp=1efcad823986fc599072f0ef173409a26946b42e;hpb=fccf5e712bfc43c5373d50cba86be1009814e3d0;p=jSite2.git diff --git a/src/net/pterodactylus/util/fcp/FcpListener.java b/src/net/pterodactylus/util/fcp/FcpListener.java index 1efcad8..8b2c621 100644 --- a/src/net/pterodactylus/util/fcp/FcpListener.java +++ b/src/net/pterodactylus/util/fcp/FcpListener.java @@ -30,7 +30,90 @@ import java.util.EventListener; public interface FcpListener extends EventListener { /** - * Notifies listeners that a message has been received. + * Notifies a listener that a “NodeHello” message was received. + * + * @param fcpConnection + * The connection that received the message + * @param nodeHello + * The “NodeHello” message + */ + public void receivedNodeHello(FcpConnection fcpConnection, NodeHello nodeHello); + + /** + * Notifies a listener that a “CloseConnectionDuplicateClientName” message + * was received. + * + * @param fcpConnection + * The connection that received the message + * @param closeConnectionDuplicateClientName + * The “CloseConnectionDuplicateClientName” message + */ + public void receivedCloseConnectionDuplicateClientName(FcpConnection fcpConnection, CloseConnectionDuplicateClientName closeConnectionDuplicateClientName); + + /** + * 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 “PeerRemoved” message was received. + * + * @param fcpConnection + * The connection that received the message + * @param peerRemoved + * The “PeerRemoved” message + */ + public void receviedPeerRemoved(FcpConnection fcpConnection, PeerRemoved peerRemoved); + + /** + * 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! * * @param fcpConnection * The connection that received the message