/*
- * jSite2 - FpcConnection.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - FpcConnection.java - Copyright © 2008 David Roden
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
fcpListenerManager.fireReceivedNodeHello(new NodeHello(fcpMessage));
} else if ("CloseConnectionDuplicateClientName".equals(messageName)) {
fcpListenerManager.fireReceivedCloseConnectionDuplicateClientName(new CloseConnectionDuplicateClientName(fcpMessage));
+ } else if ("SentFeed".equals(messageName)) {
+ fcpListenerManager.fireSentFeed(new SentFeed(fcpMessage));
+ } else if ("ReceivedBookmarkFeed".equals(messageName)) {
+ fcpListenerManager.fireReceivedBookmarkFeed(new ReceivedBookmarkFeed(fcpMessage));
} else {
fcpListenerManager.fireMessageReceived(fcpMessage);
}
//
/**
- * Incremets the counter in {@link #incomingMessageStatistics} by <cod>1</code>
- * for the given message name.
+ * Incremets the counter in {@link #incomingMessageStatistics} by
+ * <cod>1</code> for the given message name.
*
* @param name
* The name of the message to count
* The length of the stream
* @return The limited input stream
*/
- private LimitedInputStream getInputStream(long dataLength) {
+ private synchronized LimitedInputStream getInputStream(long dataLength) {
if (dataLength <= 0) {
return new LimitedInputStream(null, 0);
}
* @throws IOException
* if an I/O error occurs
*/
- public void consume() throws IOException {
+ public synchronized void consume() throws IOException {
while (remaining > 0) {
skip(remaining);
}