users@jersey.java.net

[Jersey] Re: Client and custom socket factory

From: Christopher Piggott <cpiggott_at_gmail.com>
Date: Sun, 20 Feb 2011 00:32:39 -0500

Hi,

On Fri, Feb 11, 2011 at 9:59 AM, Petr Jurák <petr.jurak_at_gmail.com> wrote:
> Ok, I see what you want.
> So try jersey with apache client:
>
> HostConfiguration hostConfiguration = new HostConfiguration();
> byte b[] = new byte[4];
> b[0] = new Integer(192).byteValue();
> b[1] = new Integer(168).byteValue();
> b[2] = new Integer(1).byteValue();
> b[3] = new Integer(11).byteValue();
>
> hostConfiguration.setLocalAddress(InetAddress.getByAddress(b));
> HttpClient client = new HttpClient();
> client.setHostConfiguration(hostConfiguration);
>
> Something like that. I hope this help.
>
> Regards,
> Petr

That gets me an HttpClient object, but how do I get from there to a
jersey client (com.sun.jersey.api.client.Client) ?