X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Futil%2Ffcp%2FFcpConnection.java;h=6cd71b4d0f20d2036e2098e7ed2099d595f0ce59;hb=90ef444ae9f502750c837076f1588483619a4212;hp=ba167d1f884162e2662bee0f84823cdec33f0942;hpb=a238aa37f5716eb715f18a37a436d3ca792e33b0;p=jSite2.git diff --git a/src/net/pterodactylus/util/fcp/FcpConnection.java b/src/net/pterodactylus/util/fcp/FcpConnection.java index ba167d1..6cd71b4 100644 --- a/src/net/pterodactylus/util/fcp/FcpConnection.java +++ b/src/net/pterodactylus/util/fcp/FcpConnection.java @@ -209,12 +209,12 @@ public class FcpConnection { /** * Notifies all listeners that a “PeerNote” message was received. * - * @see FcpListener#receviedPeerNote(FcpConnection, PeerNote) + * @see FcpListener#receivedPeerNote(FcpConnection, PeerNote) * @param peerNote */ private void fireReceivedPeerNote(PeerNote peerNote) { for (FcpListener fcpListener: fcpListeners) { - fcpListener.receviedPeerNote(this, peerNote); + fcpListener.receivedPeerNote(this, peerNote); } } @@ -235,13 +235,38 @@ public class FcpConnection { /** * Notifies all listeners that a “PeerRemoved” message was received. * - * @see FcpListener#receviedPeerRemoved(FcpConnection, PeerRemoved) + * @see FcpListener#receivedPeerRemoved(FcpConnection, PeerRemoved) * @param peerRemoved * The “PeerRemoved” message */ private void fireReceivedPeerRemoved(PeerRemoved peerRemoved) { for (FcpListener fcpListener: fcpListeners) { - fcpListener.receviedPeerRemoved(this, peerRemoved); + fcpListener.receivedPeerRemoved(this, peerRemoved); + } + } + + /** + * Notifies all listeners that a “NodeData” message was received. + * + * @see FcpListener#receivedNodeData(FcpConnection, NodeData) + * @param nodeData + * The “NodeData” message + */ + private void fireReceivedNodeData(NodeData nodeData) { + for (FcpListener fcpListener: fcpListeners) { + fcpListener.receivedNodeData(this, nodeData); + } + } + + /** + * Notifies all listeners that a “TestDDAReply” message was received. + * + * @param testDDAReply + * The “TestDDAReply” message + */ + private void fireReceivedTestDDAReply(TestDDAReply testDDAReply) { + for (FcpListener fcpListener: fcpListeners) { + fcpListener.receivedTestDDAReply(this, testDDAReply); } } @@ -331,6 +356,10 @@ public class FcpConnection { fireReceivedSSKKeypair(new SSKKeypair(fcpMessage)); } else if ("PeerRemoved".equals(messageName)) { fireReceivedPeerRemoved(new PeerRemoved(fcpMessage)); + } else if ("NodeData".equals(messageName)) { + fireReceivedNodeData(new NodeData(fcpMessage)); + } else if ("TestDDAReply".equals(messageName)) { + fireReceivedTestDDAReply(new TestDDAReply(fcpMessage)); } else if ("NodeHello".equals(messageName)) { fireReceivedNodeHello(new NodeHello(fcpMessage)); } else if ("CloseConnectionDuplicateClientName".equals(messageName)) {