Hi Roland Thanks for your answer. It has helped me!
I am not using server-relative paths so I'll use ThreadLocal variable :-). Regards On Monday 18 September 2006 16:37, Roland Weber wrote: > Hello Martin, > > > I need to throttle HTTP connections to limit bandwidth. Now I can > > throttle all connections using some protocol by using > > org.apache.jmeter.protocol.http.util.SlowHttpClientSocketFactory and > > Protocol.register(). But this is not sufficient to me. What I need is to > > be able to set different limit before each HttpMethod execution. > > If you are using server-relative paths, you can pass the HostConfiguration > to be used explicitly to HttpClient: > http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/htt >pclient/HttpClient.html#executeMethod(org.apache.commons.httpclient.HostConf >iguration,%20org.apache.commons.httpclient.HttpMethod) In that case, the > Protocol instance will be taken from the HostConfiguration argument, and > you can pass in any protocol (and protocol socket factory) you want to be > used for this method specifically. > > Otherwise, there's always the ugly trick of using a ThreadLocal variable > that is set before calling the execute method and read by the protocol > socket factory to decide how much to throttle, if at all. > > hope that helps, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Zdila Analyst/Developer EpiSoftware Slovakia Ltd. Letna 27, 043 14 Kosice cellular: +421 908 363 848 phone: +421 55 6770 420 fax: +421 55 6770 420 mailto:[EMAIL PROTECTED] http://www.episoftware.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
