public class ServiceChannel
extends java.lang.Object
implements java.nio.channels.AsynchronousByteChannel
AsynchronousByteChannel based on an ExecutorService.| Constructor and Description |
|---|
ServiceChannel(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.util.concurrent.ExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isOpen() |
java.util.concurrent.Future<java.lang.Integer> |
read(java.nio.ByteBuffer dst) |
<A> void |
read(java.nio.ByteBuffer dst,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler) |
java.util.concurrent.Future<java.lang.Integer> |
write(java.nio.ByteBuffer src) |
<A> void |
write(java.nio.ByteBuffer src,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler) |
public ServiceChannel(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.util.concurrent.ExecutorService executor)
public java.util.concurrent.Future<java.lang.Integer> read(java.nio.ByteBuffer dst)
read in interface java.nio.channels.AsynchronousByteChannelpublic <A> void read(java.nio.ByteBuffer dst,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
read in interface java.nio.channels.AsynchronousByteChannelpublic java.util.concurrent.Future<java.lang.Integer> write(java.nio.ByteBuffer src)
write in interface java.nio.channels.AsynchronousByteChannelpublic <A> void write(java.nio.ByteBuffer src,
A attachment,
java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
write in interface java.nio.channels.AsynchronousByteChannelpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.AsynchronousChannelclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.ChannelCopyright © 2007–2020. All rights reserved.