final IoEvent e = new IoEvent(IoEventType.WRITE, session, writeRequest);
if (queueHandler.accept(this, e)) {
nextFilter.filterWrite(session, writeRequest);
WriteFuture writeFuture = writeRequest.getFuture();
if (writeFuture == null) {
return;
}
// We can track the write request only when it has a future.
queueHandler.offered(this, e);
writeFuture.addListener(new IoFutureListener<WriteFuture>() {
public void operationComplete(WriteFuture future) {
queueHandler.polled(WriteRequestFilter.this, e);
}
});
}