1 48 49 package com.caucho.hessian.client; 50 51 import com.caucho.hessian.io.HessianRemoteResolver; 52 53 import java.io.IOException ; 54 55 58 public class HessianProxyResolver implements HessianRemoteResolver { 59 private HessianProxyFactory _factory; 60 61 64 public HessianProxyResolver(HessianProxyFactory factory) 65 { 66 _factory = factory; 67 } 68 69 72 public Object lookup(String type, String url) 73 throws IOException 74 { 75 ClassLoader loader = Thread.currentThread().getContextClassLoader(); 76 77 try { 78 Class api = Class.forName(type, false, loader); 79 80 return _factory.create(api, url); 81 } catch (Exception e) { 82 throw new IOException (String.valueOf(e)); 83 } 84 } 85 } 86 | Popular Tags |