[
https://issues.apache.org/jira/browse/HTTPCLIENT-734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580299#action_12580299
]
Oleg Kalnichevski commented on HTTPCLIENT-734:
----------------------------------------------
Hi Sam
This looks much better. However, I do not quite like the fact that the proposed
changes introduce a dependency between client protocol layer and the connection
management layer
I personally think it would be cleaner to give he control over the connection
allocation back t to the client request director. Instead of connection manager
injecting some code into the AbortableHttpRequest, how about the connection
manager returning a handle object representing a pending request for a
connection and letting the request director handle it? The request director in
its turn could inject the handle object into the AbortableHttpRequest
public interface ClientConnectionManager {
...
ClientConnectionRequest requestConnection(HttpRoute route,
long timeout,
TimeUnit tunit)
throws ConnectionPoolTimeoutException, InterruptedException;
...
}
public interface ClientConnectionRequest {
ManagedClientConnection getConnection()
throws InterruptedException;
void abort();
boolean isCompleted();
boolean isTimedOut();
boolean isAborted();
}
Does this make any sense to you?
Anyways, let tackle problem in small incremental steps. First thing that we
need, no matter what approach, we take is ability to abort WaitingThread. Then,
we can think of a way to propagate access to that method to the
AbortableHttpRequest.
Oleg
> request.abort() should interrupt thread waiting for a connection
> ----------------------------------------------------------------
>
> Key: HTTPCLIENT-734
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-734
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient
> Affects Versions: 4.0 Alpha 2
> Reporter: Roland Weber
> Fix For: 4.0 Beta 1
>
> Attachments: changes.txt, changes.txt, changes.txt, connabort.patch
>
>
> Calls to HttpRequestBase.abort() will not unblock a thread that is still
> waiting for a connection and therefore has no ConnectionReleaseTrigger yet.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]