jdk/test/java/nio/channels/AsynchronousChannelGroup/Unbounded.java
changeset 3327 82e069ae54ab
parent 2057 3acf8e5e2ca0
child 3632 399359a027de
equal deleted inserted replaced
3326:31a5302fe6d4 3327:82e069ae54ab
    43 
    43 
    44         // create listener to accept connections
    44         // create listener to accept connections
    45         final AsynchronousServerSocketChannel listener =
    45         final AsynchronousServerSocketChannel listener =
    46             AsynchronousServerSocketChannel.open()
    46             AsynchronousServerSocketChannel.open()
    47                 .bind(new InetSocketAddress(0));
    47                 .bind(new InetSocketAddress(0));
    48         listener.accept(null, new CompletionHandler<AsynchronousSocketChannel,Void>() {
    48         listener.accept((Void)null, new CompletionHandler<AsynchronousSocketChannel,Void>() {
    49             public void completed(AsynchronousSocketChannel ch, Void att) {
    49             public void completed(AsynchronousSocketChannel ch, Void att) {
    50                 queue.add(ch);
    50                 queue.add(ch);
    51                 listener.accept(null, this);
    51                 listener.accept((Void)null, this);
    52             }
    52             }
    53             public void failed(Throwable exc, Void att) {
    53             public void failed(Throwable exc, Void att) {
    54             }
    54             }
    55             public void cancelled(Void att) {
    55             public void cancelled(Void att) {
    56             }
    56             }