import java.util.Map;
import java.util.logging.Logger;
+import net.pterodactylus.util.logging.Logging;
+
/**
* An FCP connection to a Freenet node.
*
public class FcpConnection implements Closeable {
/** Logger. */
- private static final Logger logger = Logger.getLogger(FcpConnection.class.getName());
+ private static final Logger logger = Logging.getLogger(FcpConnection.class.getName());
/** The default port for FCP v2. */
public static final int DEFAULT_PORT = 9481;
private FcpConnectionHandler connectionHandler;
/** Incoming message statistics. */
- private Map<String, Integer> incomingMessageStatistics = Collections.synchronizedMap(new HashMap<String, Integer>());
+ private static final Map<String, Integer> incomingMessageStatistics = Collections.synchronizedMap(new HashMap<String, Integer>());
/**
* Creates a new FCP connection to the freenet node running on localhost,
* Closes the connection. If there is no connection to the node, this method
* does nothing.
*/
+ @Override
public void close() {
handleDisconnect(null);
}
* @see java.io.FilterInputStream#mark(int)
*/
@Override
- public void mark(int readlimit) {
+ public synchronized void mark(int readlimit) {
/* do nothing. */
}
* @see java.io.FilterInputStream#reset()
*/
@Override
- public void reset() throws IOException {
+ public synchronized void reset() throws IOException {
/* do nothing. */
}