this.response = response;
this.entity = entity;
if (entity instanceof HttpAsyncContentProducer) {
this.contentProducer = (HttpAsyncContentProducer) entity;
} else {
this.contentProducer = new EntityAsyncContentProducer(entity);
}
this.keepAlive = keepAlive;
}