Example usage for org.apache.http.impl.nio.conn LoggingIOSession LoggingIOSession

List of usage examples for org.apache.http.impl.nio.conn LoggingIOSession LoggingIOSession

Introduction

In this page you can find the example usage for org.apache.http.impl.nio.conn LoggingIOSession LoggingIOSession.

Prototype

public LoggingIOSession(final IOSession session, final String id, final Log log, final Log wirelog) 

Source Link

Usage

From source file:org.apache.http.impl.nio.conn.DefaultClientAsyncConnection.java

public DefaultClientAsyncConnection(final String id, final IOSession iosession,
        final HttpResponseFactory responseFactory, final ByteBufferAllocator allocator,
        final HttpParams params) {
    super(iosession, responseFactory, allocator, params);
    this.id = id;
    this.original = iosession;
    this.log = LogFactory.getLog(iosession.getClass());
    if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
        bind(new LoggingIOSession(iosession, this.id, this.log, this.wirelog));
    }// w  w  w . j a  v a  2s.c  o  m
}

From source file:org.apache.http.impl.nio.conn.DefaultClientAsyncConnection.java

@Override
public void upgrade(final IOSession iosession) {
    this.original = iosession;
    if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
        this.log.debug(this.id + " Upgrade session " + iosession);
        bind(new LoggingIOSession(iosession, this.id, this.headerlog, this.wirelog));
    } else {/* w ww  .  jav  a  2 s  .com*/
        bind(iosession);
    }
}

From source file:org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl.java

public ManagedNHttpClientConnectionImpl(final String id, final Log log, final Log headerlog, final Log wirelog,
        final IOSession iosession, final int buffersize, final int fragmentSizeHint,
        final ByteBufferAllocator allocator, final CharsetDecoder chardecoder, final CharsetEncoder charencoder,
        final MessageConstraints constraints, final ContentLengthStrategy incomingContentStrategy,
        final ContentLengthStrategy outgoingContentStrategy,
        final NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
        final NHttpMessageParserFactory<HttpResponse> responseParserFactory) {
    super(iosession, buffersize, fragmentSizeHint, allocator, chardecoder, charencoder, constraints,
            incomingContentStrategy, outgoingContentStrategy, requestWriterFactory, responseParserFactory);
    this.id = id;
    this.log = log;
    this.headerlog = headerlog;
    this.wirelog = wirelog;
    this.original = iosession;
    if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
        super.bind(new LoggingIOSession(iosession, this.id, this.log, this.wirelog));
    }//from   www  .ja  v a 2 s.  com
}

From source file:org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl.java

@Override
public void bind(final IOSession iosession) {
    Args.notNull(iosession, "I/O session");
    Asserts.check(!iosession.isClosed(), "I/O session is closed");
    this.status = ACTIVE;
    this.original = iosession;
    if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
        this.log.debug(this.id + " Upgrade session " + iosession);
        super.bind(new LoggingIOSession(iosession, this.id, this.log, this.wirelog));
    } else {//from   w  w w . ja  va2s .  co m
        super.bind(iosession);
    }
}