public static class Nio2Channel.ClosedNio2Channel extends Nio2Channel
Nio2Channel.ClosedNio2Channel
bufHandler, emptyBuf, sc, socketWrapper
Constructor and Description |
---|
ClosedNio2Channel() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this channel.
|
void |
free()
Free the channel memory
|
boolean |
isOpen()
Tells whether or not this channel is open.
|
Future<Integer> |
read(ByteBuffer dst) |
<A> void |
read(ByteBuffer[] dsts,
int offset,
int length,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Long,? super A> handler) |
<A> void |
read(ByteBuffer dst,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Integer,? super A> handler) |
void |
reset(AsynchronousSocketChannel channel,
SocketWrapperBase<Nio2Channel> socket)
Reset the channel.
|
void |
setAppReadBufHandler(ApplicationBufferHandler handler) |
String |
toString() |
Future<Integer> |
write(ByteBuffer src) |
<A> void |
write(ByteBuffer[] srcs,
int offset,
int length,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Long,? super A> handler) |
<A> void |
write(ByteBuffer src,
long timeout,
TimeUnit unit,
A attachment,
CompletionHandler<Integer,? super A> handler) |
close, flush, getAppReadBufHandler, getBufHandler, getIOChannel, handshake, isClosing, isHandshakeComplete, read, write
public void close() throws IOException
Nio2Channel
close
in interface Closeable
close
in interface AutoCloseable
close
in interface AsynchronousChannel
close
in interface Channel
close
in class Nio2Channel
IOException
- If an I/O error occurspublic boolean isOpen()
Nio2Channel
isOpen
in interface Channel
isOpen
in class Nio2Channel
true
if, and only if, this channel is openpublic void reset(AsynchronousSocketChannel channel, SocketWrapperBase<Nio2Channel> socket) throws IOException
Nio2Channel
reset
in class Nio2Channel
channel
- The new async channel to associate with this NIO2 channelsocket
- The new socket to associate with this NIO2 channelIOException
- If a problem was encountered resetting the channelpublic void free()
Nio2Channel
free
in class Nio2Channel
public void setAppReadBufHandler(ApplicationBufferHandler handler)
setAppReadBufHandler
in class Nio2Channel
public Future<Integer> read(ByteBuffer dst)
read
in interface AsynchronousByteChannel
read
in class Nio2Channel
public <A> void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
read
in class Nio2Channel
public <A> void read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
read
in class Nio2Channel
public Future<Integer> write(ByteBuffer src)
write
in interface AsynchronousByteChannel
write
in class Nio2Channel
public <A> void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler<Integer,? super A> handler)
write
in class Nio2Channel
public <A> void write(ByteBuffer[] srcs, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler<Long,? super A> handler)
write
in class Nio2Channel
public String toString()
toString
in class Nio2Channel
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.