/** * Hook for creating the connection pool. * * @return the connection pool to use */ protected AbstractConnPool createConnectionPool(final HttpParams params) { AbstractConnPool acp = new ConnPoolByRoute(connOperator, params); boolean conngc = true; //@@@ check parameters to decide if (conngc) { acp.enableConnectionGC(); } return acp; }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @since 4.1 */ protected ConnPoolByRoute createConnectionPool(final long connTTL, final TimeUnit connTTLTimeUnit) { return new ConnPoolByRoute(connOperator, connPerRoute, 20, connTTL, connTTLTimeUnit); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @since 4.1 */ protected ConnPoolByRoute createConnectionPool(final long connTTL, final TimeUnit connTTLTimeUnit) { return new ConnPoolByRoute(connOperator, connPerRoute, 20, connTTL, connTTLTimeUnit); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @since 4.1 */ protected ConnPoolByRoute createConnectionPool(final long connTTL, final TimeUnit connTTLTimeUnit) { return new ConnPoolByRoute(connOperator, connPerRoute, 20, connTTL, connTTLTimeUnit); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @since 4.1 */ protected ConnPoolByRoute createConnectionPool(final long connTTL, final TimeUnit connTTLTimeUnit) { return new ConnPoolByRoute(connOperator, connPerRoute, 20, connTTL, connTTLTimeUnit); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @deprecated (4.1) use #createConnectionPool(long, TimeUnit)) */ @Deprecated protected AbstractConnPool createConnectionPool(final HttpParams params) { return new ConnPoolByRoute(connOperator, params); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @deprecated (4.1) use #createConnectionPool(long, TimeUnit)) */ @Deprecated protected AbstractConnPool createConnectionPool(final HttpParams params) { return new ConnPoolByRoute(connOperator, params); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @deprecated (4.1) use #createConnectionPool(long, TimeUnit)) */ @Deprecated protected AbstractConnPool createConnectionPool(final HttpParams params) { return new ConnPoolByRoute(connOperator, params); }
/** * Hook for creating the connection pool. * * @return the connection pool to use * * @deprecated (4.1) use #createConnectionPool(long, TimeUnit)) */ @Deprecated protected AbstractConnPool createConnectionPool(final HttpParams params) { return new ConnPoolByRoute(connOperator, params); }
/** * Hook for creating the connection pool. * * @return the connection pool to use */ protected AbstractConnPool createConnectionPool(final HttpParams params) { AbstractConnPool acp = new ConnPoolByRoute(connOperator, params); boolean conngc = true; //@@@ check parameters to decide if (conngc) { acp.enableConnectionGC(); } return acp; }
/** * Hook for creating the connection pool. * * @return the connection pool to use */ protected AbstractConnPool createConnectionPool(final HttpParams params) { AbstractConnPool acp = new ConnPoolByRoute(connOperator, params); boolean conngc = true; //@@@ check parameters to decide if (conngc) { acp.enableConnectionGC(); } return acp; }
/** * Hook for creating the connection pool. * * @return the connection pool to use */ protected AbstractConnPool createConnectionPool(final HttpParams params) { AbstractConnPool acp = new ConnPoolByRoute(connOperator, params); boolean conngc = true; //@@@ check parameters to decide if (conngc) { acp.enableConnectionGC(); } return acp; }
/** * Hook for creating the connection pool. * * @return the connection pool to use */ protected AbstractConnPool createConnectionPool(final HttpParams params) { AbstractConnPool acp = new ConnPoolByRoute(connOperator, params); boolean conngc = true; //@@@ check parameters to decide if (conngc) { acp.enableConnectionGC(); } return acp; }
@Override protected AbstractConnPool createConnectionPool(final HttpParams params) { // Set the maximum connections per host for the HTTP connection manager, // *and* also set the maximum number of total connections (new in 0.7.1). // The max connections per host setting is made the same value as the max // global connections if there is no per-host property. Jets3tProperties props = (Jets3tProperties) params.getParameter( Jets3tProperties.JETS3T_PROPERTIES_ID); int maxConn = 20; int maxConnectionsPerHost = 0; if (props != null) { maxConn = props.getIntProperty("httpclient.max-connections", 20); maxConnectionsPerHost = props.getIntProperty( "httpclient.max-connections-per-host", 0); } if (maxConnectionsPerHost == 0) { maxConnectionsPerHost = maxConn; } connPerRoute.setDefaultMaxPerRoute(maxConnectionsPerHost); return new ConnPoolByRoute(connOperator, connPerRoute, maxConn,props.getLongProperty("httpclient.connection.ttl", -1L), TimeUnit.MILLISECONDS); } } //ThreadSafeConnManager
@Override protected AbstractConnPool createConnectionPool(final HttpParams params) { // Set the maximum connections per host for the HTTP connection manager, // *and* also set the maximum number of total connections (new in 0.7.1). // The max connections per host setting is made the same value as the max // global connections if there is no per-host property. Jets3tProperties props = (Jets3tProperties) params.getParameter( Jets3tProperties.JETS3T_PROPERTIES_ID); int maxConn = 20; int maxConnectionsPerHost = 0; if (props != null) { maxConn = props.getIntProperty("httpclient.max-connections", 20); maxConnectionsPerHost = props.getIntProperty( "httpclient.max-connections-per-host", 0); } if (maxConnectionsPerHost == 0) { maxConnectionsPerHost = maxConn; } connPerRoute.setDefaultMaxPerRoute(maxConnectionsPerHost); return new ConnPoolByRoute(connOperator, connPerRoute, maxConn,props.getLongProperty("httpclient.connection.ttl", -1L), TimeUnit.MILLISECONDS); } } //ThreadSafeConnManager