final ByteBufferAllocator allocator = new HeapByteBufferAllocator();
return new ClientAsyncConnectionFactory() {
@Override
public ClientAsyncConnection create(String id, IOSession iosession, HttpParams params) {
return new DefaultClientAsyncConnection(id, iosession,
responseFactory,
allocator, params) {
@Override
protected void onRequestSubmitted(HttpRequest request) {
super.onRequestSubmitted(request);