Methods Summary |
---|
public void | close()Closes this channel.
getIOChannel().socket().close();
getIOChannel().close();
|
public void | close(boolean force)
if (isOpen() || force ) close();
|
public boolean | flush(boolean block, java.nio.channels.Selector s, long timeout)returns true if the network buffer has
been flushed out and is empty
return true; //no network buffer in the regular channel
|
public java.lang.Object | getAttachment(boolean remove)
Poller pol = getPoller();
Selector sel = pol!=null?pol.getSelector():null;
SelectionKey key = sel!=null?getIOChannel().keyFor(sel):null;
Object att = key!=null?key.attachment():null;
if (key != null && att != null && remove ) key.attach(null);
return att;
|
public org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler | getBufHandler()getBufHandler
return bufHandler;
|
public int | getBufferSize()
if ( bufHandler == null ) return 0;
int size = 0;
size += bufHandler.getReadBuffer()!=null?bufHandler.getReadBuffer().capacity():0;
size += bufHandler.getWriteBuffer()!=null?bufHandler.getWriteBuffer().capacity():0;
return size;
|
public java.nio.channels.SocketChannel | getIOChannel()getIOChannel
return sc;
|
public org.apache.tomcat.util.net.NioEndpoint.Poller | getPoller()
return poller;
|
public int | handshake(boolean read, boolean write)
return 0;
|
public boolean | isClosing()isClosing
return false;
|
public boolean | isInitHandshakeComplete()isInitHandshakeComplete
return true;
|
public boolean | isOpen()Tells whether or not this channel is open.
return sc.isOpen();
|
public int | read(java.nio.ByteBuffer dst)Reads a sequence of bytes from this channel into the given buffer.
return sc.read(dst);
|
public void | reset()
bufHandler.getReadBuffer().clear();
bufHandler.getWriteBuffer().clear();
|
public void | setIOChannel(java.nio.channels.SocketChannel IOChannel)
this.sc = IOChannel;
|
public void | setPoller(org.apache.tomcat.util.net.NioEndpoint.Poller poller)
this.poller = poller;
|
public java.lang.String | toString()
return super.toString()+":"+this.sc.toString();
|
public int | write(java.nio.ByteBuffer src)Writes a sequence of bytes to this channel from the given buffer.
return sc.write(src);
|