From d1c26217003a24c28bac49f6140e2dda0a8a86eb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 8 Oct 2024 09:03:52 +0200 Subject: BFTP: Rename threadpool, add comment --- src/main/java/org/openslx/filetransfer/IncomingEvent.java | 4 ++-- src/main/java/org/openslx/filetransfer/Listener.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/openslx/filetransfer/IncomingEvent.java b/src/main/java/org/openslx/filetransfer/IncomingEvent.java index d72ecdd..890bd07 100644 --- a/src/main/java/org/openslx/filetransfer/IncomingEvent.java +++ b/src/main/java/org/openslx/filetransfer/IncomingEvent.java @@ -2,7 +2,6 @@ package org.openslx.filetransfer; import java.io.IOException; -/***************************************************************************/ /** * IncomingEvent interface for handling what should happen with incoming * uploader or downloader in Listener. Must be implemented outside. @@ -11,7 +10,8 @@ import java.io.IOException; */ public interface IncomingEvent { + /** Must not block */ void incomingDownloadRequest( Uploader uploader ) throws IOException; - + /** Must not block */ void incomingUploadRequest( Downloader downloader ) throws IOException; } diff --git a/src/main/java/org/openslx/filetransfer/Listener.java b/src/main/java/org/openslx/filetransfer/Listener.java index d1af4ac..43c3847 100644 --- a/src/main/java/org/openslx/filetransfer/Listener.java +++ b/src/main/java/org/openslx/filetransfer/Listener.java @@ -28,7 +28,7 @@ public class Listener private Thread acceptThread = null; private final int readTimeoutMs; private final ExecutorService processingPool = new ThreadPoolExecutor( 0, 8, 5, TimeUnit.MINUTES, new SynchronousQueue(), - new PrioThreadFactory( "BFTP-BS" ) ); + new PrioThreadFactory( "BFTP-Init" ) ); private static final byte CONNECTING_PEER_WANTS_TO_UPLOAD = 85; // ASCII 'U' = 85. private static final byte CONNECTING_PEER_WANTS_TO_DOWNLOAD = 68; // ASCII 'D' = 68. -- cgit v1.2.3-55-g7522