This code use to work perfectly for RESTEasy. With the deprecation of ProxyFactory and ClientExecutor I need options.
PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager();
DefaultHttpClient httpClient = new DefaultHttpClient(connectionManager);
ClientExecutor clientExecutor = new ApacheHttpClient4Executor(httpClient);
MyClass client = ProxyFactory.create(MyClass.class, "http://localhost", clientExecutor);