hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Force-close connections queston
Date Sat, 08 Jul 2006 16:49:55 GMT
Hello Jeremy,

> ((SSLSocket) conn.getSocket()).getSession().invalidate();
> won't work for me because the getSocket() call on the HttpConnection conn is a protected
method.
> I'm not within scope. What are my options?

Yet another design limitation of the 3.x codebase.
Easiest workaround is to get into scope:

package org.apache.commons.httpclient;
import java.net.Socket;
public final class MyConnectionHelper {
  /** disabled constructor */
  private MyConnectionHelper() {
  }
  public final static Socket getSocket(HttpConnection conn) {
    return conn.getSocket();
  }
}


I think you can rely on HttpClient not to define any classes
with a "My" prefix :-)

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message