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

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

Introduction

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

Prototype

public HttpResponseWriter(SessionOutputBuffer sessionOutputBuffer, LineFormatter lineFormatter,
            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();// w ww  .  j  a  v a  2  s  .c  o m
    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 HttpMessageWriter createResponseWriter(final SessionOutputBuffer buffer, final HttpParams params) {
    return new HttpResponseWriter(buffer, null, params);
}