--- /dev/null
+/**
+ * © 2008 INA Service GmbH
+ */
+package net.pterodactylus.util.fcp;
+
+/**
+ * The “EndListPersistentRequests” message signals the end of a list of
+ * {@link PersistentGet} and {@link PersistentPut} requests.
+ *
+ * @author <a href="mailto:dr@ina-germany.de">David Roden</a>
+ * @version $Id$
+ */
+public class EndListPersistentRequests extends BaseMessage {
+
+ /**
+ * Creates a new “EndListPersistentRequests” message that wraps the received
+ * message.
+ *
+ * @param receivedMessage
+ * The received message
+ */
+ public EndListPersistentRequests(FcpMessage receivedMessage) {
+ super(receivedMessage);
+ }
+
+}
}
/**
+ * @see net.pterodactylus.util.fcp.FcpListener#receivedEndListPersistentRequests(net.pterodactylus.util.fcp.FcpConnection,
+ * net.pterodactylus.util.fcp.EndListPersistentRequests)
+ */
+ public void receivedEndListPersistentRequests(FcpConnection fcpConnection, EndListPersistentRequests endListPersistentRequests) {
+ /* empty. */
+ }
+
+ /**
* @see net.pterodactylus.util.fcp.FcpListener#receivedProtocolError(net.pterodactylus.util.fcp.FcpConnection,
* net.pterodactylus.util.fcp.ProtocolError)
*/
}
/**
+ * Notifies all listeners that a “EndListPersistentRequests” message was
+ * received.
+ *
+ * @param endListPersistentRequests
+ * The “EndListPersistentRequests” message
+ */
+ private void fireReceivedEndListPersistentRequests(EndListPersistentRequests endListPersistentRequests) {
+ for (FcpListener fcpListener: fcpListeners) {
+ fcpListener.receivedEndListPersistentRequests(this, endListPersistentRequests);
+ }
+ }
+
+ /**
* Notifies all listeners that a “ProtocolError” message was received.
*
* @param protocolError
fireReceivedProtocolError(new ProtocolError(fcpMessage));
} else if ("PersistentPut".equals(messageName)) {
fireReceivedPersistentPut(new PersistentPut(fcpMessage));
+ } else if ("EndListPersistentRequests".equals(messageName)) {
+ fireReceivedEndListPersistentRequests(new EndListPersistentRequests(fcpMessage));
} else if ("Peer".equals(messageName)) {
fireReceivedPeer(new Peer(fcpMessage));
} else if ("PeerNote".equals(messageName)) {
public void receivedPersistentPut(FcpConnection fcpConnection, PersistentPut persistentPut);
/**
+ * Notifies a listener that a “EndListPersistentRequests” was received.
+ *
+ * @param fcpConnection
+ * The connection that received the message
+ * @param endListPersistentRequests
+ * The “EndListPersistentRequests” message
+ */
+ public void receivedEndListPersistentRequests(FcpConnection fcpConnection, EndListPersistentRequests endListPersistentRequests);
+
+ /**
* Notifies a listener that a “ProtocolError” was received.
*
* @param fcpConnection