org.xlightweb
Interface IHttpDisconnectHandler
- All Superinterfaces:
- IHttpConnectionHandler
public interface IHttpDisconnectHandler
- extends IHttpConnectionHandler
The connect handler will be called if a http connection has been disconnected. Example:
class MyHandler implements IRequestHandler, IHttpDisconnectHandler {
...
public boolean onDisconnect(IHttpConnection httpConnection) throws IOException {
IHttpConnection peerHttpConnection = (IHttpConnection) httpConnection.getAttachment();
if (peerHttpConnection != null) {
peerHttpConnection.close();
httpConnection.setAttachment(null);
}
httpConnection.close();
return true;
}
public void onRequest(HttpServerConnection httpServerConnection) throws IOException {
...
}
}
onDisconnect
boolean onDisconnect(IHttpConnection httpConnection)
throws IOException
- see
IDisconnectHandler
- Throws:
IOException