hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Sheehy <john.she...@voxer.com>
Subject PoolingClientConnectionManager and createConnectionOperator
Date Fri, 01 Feb 2013 00:53:58 GMT

I'm trying to override the entity serializer for a http POST like so

PoolingClientConnectionManager cm = new
PoolingClientConnectionManager(schemeRegistry) {
    protected ClientConnectionOperator createConnectionOperator(final
SchemeRegistry schemeRegistry) {
        return new DefaultClientConnectionOperator(schemeRegistry) {
            public OperatedClientConnection createConnection() {
                return new DefaultClientConnection() {
                    protected EntitySerializer createEntitySerializer() {
                        return new MyEntitySerializer(new

However, the createConnection() overriden function is never called. Looking
at the code, it seems there's a line in HttpConnPool (used internally by
PoolingClientConnectionManager) that simply instantiates a

Is there any way to override this behaviour?

Thanks a lot,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message