fix warning with an assertion
[jSite2.git] / src / net / pterodactylus / util / fcp / FcpListener.java
index 1efcad8..a983f88 100644 (file)
@@ -21,6 +21,10 @@ 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.
  * 
@@ -30,7 +34,40 @@ import java.util.EventListener;
 public interface FcpListener extends EventListener {
 
        /**
-        * Notifies listeners that a message has been received.
+        * Notifies listeners 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 all listeners 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 all listeners 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 listeners 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