enqueueWriteRequest(writeRequest);
} else {
writeChainPosition = chain.length - 1;
// we call the first filter, it's supposed to call the next ones using the filter chain controller
int position = writeChainPosition;
IoFilter nextFilter = chain[position];
nextFilter.messageWriting(this, writeRequest, this);
}
// put the future in the last write request
if (future != null) {
writeRequest.setFuture(future);