1 48 49 package com.caucho.burlap.client; 50 51 import com.caucho.burlap.io.BurlapRemoteResolver; 52 53 import java.io.IOException ; 54 55 58 public class BurlapProxyResolver implements BurlapRemoteResolver { 59 private BurlapProxyFactory factory; 60 61 64 public BurlapProxyResolver(BurlapProxyFactory factory) 65 { 66 this.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 |