In the grinder I have the following Function that allows me to set the ip address that my client applet connects from when I use the Grinder's http classes. I am trying to test a spring based application so need to know what the spring equivalent of this function is?
http://grinder.sourceforge.net/g3/script-javadoc/net/grinder/plugin/http/HTTPPluginConnection.html#setLocalAddress(java.lan g.String)setLocalAddress
void setLocalAddress(String localAddress)
throws URLException
Set the client IP address to use for outbound connections.
The default client IP address, and hence the network interface, used for outbound HTTP requests is the first returned to the Java VM by the operating system. This method allows a different network interface to be specified that will be used for connections that are subsequently created. It does not affect existing socket connections that may have already been created for this HTTPPluginConnection.
localAddress should correspond to a local network interface.If it doesn't a java.net.BindException will be thrown when the connection is first used.
Parameters:
localAddress - The local host name or IP address to bind to. Pass null to set the default local interface.
Throws:
URLException - If localAddress could not be resolved.
If there is no equivalent in Spring can it be done with the base Java classes?
I have been searching for over a week looking for this so will appreciate and try any suggestions.
Dave.


Reply With Quote
