JML

net.sf.jqql.net
Interface INIOHandler

All Known Implementing Classes:
AbstractProxy, HttpProxy, Socks5Proxy, TCPHttpPort, TCPPort, TCPSocks5Port, UDPPort, UDPSocks5Port

public interface INIOHandler

 Network event handler, while selector can operate, use methods of this interface.
 A port or a proxy must implement this interface 
 网络事件处理器,当Selector可以进行操作时,调用这个接口中的方法。一个Port或者一个Proxy
 必须实现此接口
 

Author:
luma

Method Summary
 void processConnect(SelectionKey sk)
          While channel get connect event, use this method 当channel得到connect事件时调用这个方法
 void processError(Exception e)
          While channel has error, use this method 当channel发生错误时调用
 void processRead(SelectionKey sk)
          While channel readable, use this method 当channel可读时调用这个方法
 void processWrite()
          While channel writable, use this method 当channel可写时调用这个方法
 

Method Detail

processConnect

void processConnect(SelectionKey sk)
                    throws IOException
While channel get connect event, use this method 当channel得到connect事件时调用这个方法

Parameters:
sk - SelectionKey
Throws:
IOException

processRead

void processRead(SelectionKey sk)
                 throws IOException,
                        PacketParseException
While channel readable, use this method 当channel可读时调用这个方法

Parameters:
sk - SelectionKey
Throws:
PacketParseException
IOException

processWrite

void processWrite()
                  throws IOException
While channel writable, use this method 当channel可写时调用这个方法

Throws:
IOException

processError

void processError(Exception e)
While channel has error, use this method 当channel发生错误时调用

Parameters:
e -

JML