1 16 17 package org.springframework.remoting.httpinvoker; 18 19 import org.springframework.aop.framework.ProxyFactory; 20 import org.springframework.beans.factory.FactoryBean; 21 22 50 public class HttpInvokerProxyFactoryBean extends HttpInvokerClientInterceptor 51 implements FactoryBean { 52 53 private Object serviceProxy; 54 55 56 public void afterPropertiesSet() { 57 super.afterPropertiesSet(); 58 if (getServiceInterface() == null) { 59 throw new IllegalArgumentException ("Property 'serviceInterface' is required"); 60 } 61 this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader()); 62 } 63 64 65 public Object getObject() { 66 return this.serviceProxy; 67 } 68 69 public Class getObjectType() { 70 return getServiceInterface(); 71 } 72 73 public boolean isSingleton() { 74 return true; 75 } 76 77 } 78 | Popular Tags |