handler.scheduleFilterWrite(nextFilter, writeRequest);
} else if (handler.isHandshakeComplete()) {
// SSL encrypt
int pos = buf.position();
handler.encrypt(buf.buf());
buf.position(pos);
IoBuffer encryptedBuffer = handler.fetchOutNetBuffer();
handler.scheduleFilterWrite(
nextFilter,
new EncryptedWriteRequest(
writeRequest, encryptedBuffer));