Skip to content

Commit

Permalink
HTTPASYNC-9: SSLIOSession wrappped with LogginIOSession treated as in…
Browse files Browse the repository at this point in the history
…secure

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk@1242073 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ok2c committed Feb 8, 2012
1 parent 98ffc4c commit a5eb377
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Expand Up @@ -54,6 +54,7 @@ public class DefaultAsyncClientConnection
private final Log log;

private String id;
private IOSession original;

public DefaultAsyncClientConnection(
final String id,
Expand All @@ -63,25 +64,25 @@ public DefaultAsyncClientConnection(
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()) {
this.session = new LoggingIOSession(iosession, this.id, this.log, this.wirelog);
bind(new LoggingIOSession(iosession, this.id, this.log, this.wirelog));
}
}

public void upgrade(final IOSession iosession) {
this.session.setBufferStatus(null);
this.original = iosession;
if (this.log.isDebugEnabled() || this.wirelog.isDebugEnabled()) {
this.log.debug(this.id + " Upgrade session " + iosession);
this.session = new LoggingIOSession(iosession, this.id, this.headerlog, this.wirelog);
bind(new LoggingIOSession(iosession, this.id, this.headerlog, this.wirelog));
} else {
this.session = iosession;
bind(iosession);
}
this.session.setBufferStatus(this);
}

public IOSession getIOSession() {
return this.session;
return this.original;
}

@Override
Expand Down
Expand Up @@ -62,7 +62,7 @@ class ManagedAsyncClientConnectionImpl implements ManagedAsyncClientConnection {
private volatile boolean reusable;
private volatile long duration;

public ManagedAsyncClientConnectionImpl(
ManagedAsyncClientConnectionImpl(
final ClientAsyncConnectionManager manager,
final HttpPoolEntry poolEntry) {
super();
Expand Down Expand Up @@ -296,7 +296,8 @@ protected HttpResponseFactory createHttpResponseFactory() {

public synchronized void open(
final HttpRoute route,
final HttpContext context, final HttpParams params) throws IOException {
final HttpContext context,
final HttpParams params) throws IOException {
HttpPoolEntry entry = ensurePoolEntry();
RouteTracker tracker = entry.getTracker();
if (tracker.isConnected()) {
Expand Down

0 comments on commit a5eb377

Please sign in to comment.