org.apache.tomcat.util.net
public class NioChannel extends Object implements ByteChannel
Version: 1.0
Field Summary | |
---|---|
protected SecureNioChannel.ApplicationBufferHandler | bufHandler |
protected static ByteBuffer | emptyBuf |
protected NioEndpoint.Poller | poller |
protected SocketChannel | sc |
protected boolean | sendFile |
Constructor Summary | |
---|---|
NioChannel(SocketChannel channel, SecureNioChannel.ApplicationBufferHandler bufHandler) |
Method Summary | |
---|---|
void | close()
Closes this channel.
|
void | close(boolean force) |
boolean | flush(boolean block, Selector s, long timeout, MutableInteger lastWrite)
returns true if the network buffer has
been flushed out and is empty |
boolean | flushOutbound()
Return true if the buffer wrote data |
Object | getAttachment(boolean remove) |
int | getBufferSize() |
SecureNioChannel.ApplicationBufferHandler | getBufHandler()
getBufHandler
|
SocketChannel | getIOChannel()
getIOChannel
|
int | getOutboundRemaining() |
NioEndpoint.Poller | getPoller() |
int | handshake(boolean read, boolean write) |
boolean | isClosing()
isClosing
|
boolean | isInitHandshakeComplete()
isInitHandshakeComplete
|
boolean | isOpen()
Tells whether or not this channel is open.
|
boolean | isSendFile() |
int | read(ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
void | reset() |
void | setIOChannel(SocketChannel IOChannel) |
void | setPoller(NioEndpoint.Poller poller) |
void | setSendFile(boolean s) |
String | toString() |
int | write(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
Throws: IOException If an I/O error occurs
UNKNOWN: Implement this java.nio.channels.Channel method
Returns: boolean
Returns:
Throws: IOException
Returns: ApplicationBufferHandler
UNKNOWN: Implement this org.apache.tomcat.util.net.SecureNioChannel method
Returns: SocketChannel
UNKNOWN: Implement this org.apache.tomcat.util.net.SecureNioChannel method
Returns: boolean
UNKNOWN: Implement this org.apache.tomcat.util.net.SecureNioChannel method
Returns: boolean
UNKNOWN: Implement this org.apache.tomcat.util.net.SecureNioChannel method
Returns: true if, and only if, this channel is open
UNKNOWN: Implement this java.nio.channels.Channel method
Parameters: dst The buffer into which bytes are to be transferred
Returns: The number of bytes read, possibly zero, or -1 if the channel has reached end-of-stream
Throws: IOException If some other I/O error occurs
UNKNOWN: Implement this java.nio.channels.ReadableByteChannel method
Parameters: src The buffer from which bytes are to be retrieved
Returns: The number of bytes written, possibly zero
Throws: IOException If some other I/O error occurs
UNKNOWN: Implement this java.nio.channels.WritableByteChannel method