78798081828384
this.allocator = allocator; this.params = params; } public DefaultNHttpServerConnectionFactory(final HttpParams params) { this(new DefaultHttpRequestFactory(), new HeapByteBufferAllocator(), params); }
102103104105106107108
final HttpProcessor httpProcessor, final HttpResponseFactory responseFactory, final ConnectionReuseStrategy connStrategy, final HttpParams params) { this(httpProcessor, responseFactory, connStrategy, new HeapByteBufferAllocator(), params); }
180181182183184185186
public ConsumingNHttpEntity entityRequest( final HttpEntityEnclosingRequest request, final HttpContext context) throws HttpException, IOException { return new BufferingNHttpEntity( request.getEntity(), new HeapByteBufferAllocator()); }
92939495969798
public SSLNHttpServerConnectionFactory( final SSLContext sslcontext, final SSLSetupHandler sslHandler, final HttpParams params) { this(sslcontext, sslHandler, new DefaultHttpRequestFactory(), new HeapByteBufferAllocator(), params); }
9899100101102103104
* a different implementation of the {@link ByteBufferAllocator} interface. * * @return byte buffer allocator. */ protected ByteBufferAllocator createByteBufferAllocator() { return new HeapByteBufferAllocator(); }
113114115116117118119
final HttpProcessor httpProcessor, final NHttpRequestExecutionHandler execHandler, final ConnectionReuseStrategy connStrategy, final HttpParams params) { this(httpProcessor, execHandler, connStrategy, new HeapByteBufferAllocator(), params); }
this.allocator = allocator; this.params = params; } public DefaultNHttpClientConnectionFactory(final HttpParams params) { this(new DefaultHttpResponseFactory(), new HeapByteBufferAllocator(), params); }
60616263646566
} public ConsumingNHttpEntity entityRequest( final HttpEntityEnclosingRequest request, final HttpContext context) { return new BufferingNHttpEntity(request.getEntity(), new HeapByteBufferAllocator()); }
230231232233234235236
private final SimpleInputBuffer buffer; private volatile HttpResponse response; public LenientAsyncResponseConsumer() { super(); this.buffer = new SimpleInputBuffer(2048, new HeapByteBufferAllocator()); }
55565758596061626364
@Before public void setUp() throws Exception { this.requestHandler = Mockito.mock(HttpRequestHandler.class); this.asyncRequestHandler = new BufferingAsyncRequestHandler(this.requestHandler, new DefaultHttpResponseFactory(), new HeapByteBufferAllocator()); this.context = new BasicHttpContext(); this.request = Mockito.mock(HttpRequest.class); this.trigger = Mockito.mock(HttpAsyncResponseTrigger.class); }