diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java index 3d37a660ef0..019e3d931ce 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/SelectorManager.java @@ -165,9 +165,12 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa } /** - *
Registers a channel to select accept operations
- * - * @param channel the channel to register + *Registers a channel to select accept operations. + * When a {@link SocketChannel} is accepted from this {@link ServerSocketChannel} + * then the {@link #accepted(SocketChannel)} method is called, which must be + * overridden by a derivation of this class to handle the accepted channel + * + * @param channel the server channel to register */ public void acceptor(final ServerSocketChannel server) { @@ -175,6 +178,14 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa selector.submit(selector.new Acceptor(server)); } + /** + * Callback method when a channel is accepted from the {@link ServerSocketChannel} + * passed in {@link #acceptor(ServerSocketChannel)}. + * The default impl throws an {@link UnsupportedOperationException}, so it must + * be overridden if selected acceptor is to be used. + * @param channel + * @throws IOException + */ protected void accepted(SocketChannel channel) throws IOException { throw new UnsupportedOperationException();