Example usage for org.apache.http.impl.io HttpRequestParser HttpRequestParser

List of usage examples for org.apache.http.impl.io HttpRequestParser HttpRequestParser

Introduction

In this page you can find the example usage for org.apache.http.impl.io HttpRequestParser HttpRequestParser.

Prototype

public HttpRequestParser(SessionInputBuffer sessionInputBuffer, LineParser lineParser,
            HttpRequestFactory httpRequestFactory, HttpParams httpParams) 

Source Link

Usage

From source file:org.apache.axis2.transport.http.server.AxisHttpConnectionImpl.java

public AxisHttpConnectionImpl(final Socket socket, final HttpParams params) throws IOException {
    super();//from   w w w  . j  a  v  a 2 s .  c  om
    if (socket == null) {
        throw new IllegalArgumentException("Socket may not be null");
    }
    if (params == null) {
        throw new IllegalArgumentException("HTTP parameters may not be null");
    }
    socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(params));
    socket.setSoTimeout(HttpConnectionParams.getSoTimeout(params));

    int linger = HttpConnectionParams.getLinger(params);
    if (linger >= 0) {
        socket.setSoLinger(linger > 0, linger);
    }

    int buffersize = HttpConnectionParams.getSocketBufferSize(params);
    this.socket = socket;
    this.outbuffer = new SocketOutputBuffer(socket, buffersize, params);
    this.inbuffer = new SocketInputBuffer(socket, buffersize, params);
    this.contentLenStrategy = new StrictContentLengthStrategy();
    this.requestParser = new HttpRequestParser(this.inbuffer, null, new DefaultHttpRequestFactory(), params);
    this.responseWriter = new HttpResponseWriter(this.outbuffer, null, params);
}

From source file:org.deviceconnect.message.basic.conn.AbstractHttpConnection.java

@Override
protected HttpMessageParser createRequestParser(final SessionInputBuffer buffer,
        final HttpRequestFactory requestFactory, final HttpParams params) {
    return new HttpRequestParser(buffer, null, requestFactory, params);
}