On 13/01/06, Roland Weber <[EMAIL PROTECTED]> wrote:
> sebb wrote:
> > The MultiThreaded Connection Manager has methods
> >
> >          shutdown()
> > static shutdownAll()
> >
> > which presumably include shutting all connections
> >
> > However the Simple Connection Manager does not.
> > Just wondering why this is?
>
> Originally, neither had a shutdown() method. Then we encountered a
> need to shut down the cleanup thread for idle connections of the
> MultiThreadedConnectionManager. We never had a similar need for the
> SimpleConnectionManager, so we left it as an implementation specific
> method outside of the interface.
>
> > As far as I can tell the only way to shut the connection provided by
> > the Simple Manager is to call
> >
> > closeIdleConnections(N)      where N <= 0
> >
> > It would be useful to include the shutdown methods in the HttpClient 
> > interface.
>
> Why HttpClient? You can get from the client to the connection manager, so
> it should be sufficient to have the shutdown in the manager's interface:
>
> httpClient.getHttpConnectionManager().shutdown();

Sorry, I meant the HttpConnectionManager interface.

> Please file a feature request in bugzilla. We'll have a tough time

OK

> defining a static shutdown method in an interface though, so don't
> count on that one ;-)

indeed...

> On the other hand, adding a new method to the interface will break
> custom connection manager implementations that might be out there.
> Don't expect this change to be introduced before 3.1.
>

Though one could implement it in SimpleHttpConnectionManager right away.

Also one could introduce a new interface
"HttpConnectionManagerWithShutdown" - but with a better name ;-)

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to