インタフェース
java.nio.channels.CompletionHandlerの使用
CompletionHandlerを使用するパッケージ
-
java.nio.channelsでのCompletionHandlerの使用
型CompletionHandlerのパラメータを持つjava.nio.channelsのメソッド修飾子と型メソッド説明abstract <A> voidAsynchronousServerSocketChannel.accept(A attachment, CompletionHandler<AsynchronousSocketChannel, ? super A> handler) 接続を受け入れます。abstract <A> voidAsynchronousSocketChannel.connect(SocketAddress remote, A attachment, CompletionHandler<Void, ? super A> handler) このチャネルを接続します。abstract <A> voidAsynchronousFileChannel.lock(long position, long size, boolean shared, A attachment, CompletionHandler<FileLock, ? super A> handler) このチャネルのファイルの指定された領域をロックします。final <A> voidAsynchronousFileChannel.lock(A attachment, CompletionHandler<FileLock, ? super A> handler) このチャネルのファイル上に排他ロックを設定します。<A> voidAsynchronousByteChannel.read(ByteBuffer dst, A attachment, CompletionHandler<Integer, ? super A> handler) このチャネルのバイト・シーケンスを指定のバッファに読み込みます。abstract <A> voidAsynchronousFileChannel.read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer, ? super A> handler) このチャネルのバイト・シーケンスを、指定されたファイル位置からバッファに読み込みます。abstract <A> voidAsynchronousSocketChannel.read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler) このチャネルのバイト・シーケンスを指定されたバッファのサブシーケンスに読み込みます。abstract <A> voidAsynchronousSocketChannel.read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler) このチャネルのバイト・シーケンスを指定のバッファに読み込みます。final <A> voidAsynchronousSocketChannel.read(ByteBuffer dst, A attachment, CompletionHandler<Integer, ? super A> handler) <A> voidAsynchronousByteChannel.write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler) このチャネルのバイト・シーケンスを指定のバッファから書き出します。abstract <A> voidAsynchronousFileChannel.write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer, ? super A> handler) 指定されたバッファのバイト・シーケンスをこのチャネルの指定されたファイル位置に書き込みます。abstract <A> voidAsynchronousSocketChannel.write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long, ? super A> handler) このチャネルのバイト・シーケンスを指定されたバッファのサブシーケンスから書き出します。abstract <A> voidAsynchronousSocketChannel.write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer, ? super A> handler) このチャネルのバイト・シーケンスを指定のバッファから書き出します。final <A> voidAsynchronousSocketChannel.write(ByteBuffer src, A attachment, CompletionHandler<Integer, ? super A> handler)