add ModifyPeer command
[jSite2.git] / src / net / pterodactylus / util / fcp / FcpListener.java
index a983f88..aa8147b 100644 (file)
@@ -21,9 +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;
-import net.pterodactylus.util.fcp.message.SSKKeypair;
 
 /**
  * Interface for objects that want to be notified on certain FCP events.
@@ -34,7 +31,7 @@ import net.pterodactylus.util.fcp.message.SSKKeypair;
 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
@@ -44,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
@@ -55,7 +52,7 @@ public interface FcpListener extends EventListener {
        public void receivedCloseConnectionDuplicateClientName(FcpConnection fcpConnection, CloseConnectionDuplicateClientName closeConnectionDuplicateClientName);
 
        /**
-        * Notifies all listeners that a “SSKKeypair” message was received.
+        * Notifies a listener that a “SSKKeypair” message was received.
         * 
         * @param fcpConnection
         *            The connection that received themessage
@@ -65,7 +62,47 @@ public interface FcpListener extends EventListener {
        public void receivedSSKKeypair(FcpConnection fcpConnection, SSKKeypair sskKeypair);
 
        /**
-        * Notifies listeners that a message has been received. This method is only
+        * 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!
         *