Hi Oleg,
> Seems to make sense. But, again, I feel some questions cannot be
> adequately answered until we have HttpClient more or less functional and
> are able to test various options in action.
I'm currently working my way upward. While I was dealing with the
connection interfaces, I was pondering connection management. Now I'm
dealing with connection management and pondering HttpMethodDirector.
> I agree it is reasonable to require consumers of the connection manager
> services to release connections only if the response content has been
> consumed in its entirety. The connection manager simply has no way of
> knowing what state the released connection is in.
Well, the old connection interface had the setLastResponse() method.
I was thinking about something like:
interface ManagedClientConnection {
void setReusable(boolen reusable, HttpEntity toBeConsumed);
}
- when handed out, the connection is reusable
- read/write implicitly changes it to non-reusable
- once the response header is received:
* if reuse strategy denies: conn.setReusable(false, null)
* if there's an entity: conn.setReusable(true, entity)
* if there's no entity: conn.setReusable(true, null)
Then the connection manager would know at least those states in
which reuse is an option.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]