本文整理汇总了Java中org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean.afterPropertiesSet方法的典型用法代码示例。如果您正苦于以下问题:Java HttpInvokerProxyFactoryBean.afterPropertiesSet方法的具体用法?Java HttpInvokerProxyFactoryBean.afterPropertiesSet怎么用?Java HttpInvokerProxyFactoryBean.afterPropertiesSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
的用法示例。
在下文中一共展示了HttpInvokerProxyFactoryBean.afterPropertiesSet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInvoker
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@SuppressWarnings({"unchecked"})
protected <T> T createInvoker(Class<T> clazz, URL endpointUrl)
{
HttpInvokerProxyFactoryBean factory = new HttpInvokerProxyFactoryBean();
try
{
URL url = new URL(endpointUrl, "invoker/" + clazz.getName() + ".service");
LOGGER.info("Invoking " + url.toString());
factory.setServiceUrl(url.toString());
}
catch( MalformedURLException e )
{
throw new RuntimeException(e);
}
factory.setServiceInterface(clazz);
factory.setHttpInvokerRequestExecutor(new PluginAwareSimpleHttpInvokerRequestExecutor());
factory.afterPropertiesSet();
return (T) factory.getObject();
}
示例2: createInvoker
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected static <T> T createInvoker(Class<T> clazz, URL endpointUrl)
{
HttpInvokerProxyFactoryBean factory = new HttpInvokerProxyFactoryBean();
try
{
factory.setServiceUrl(new URL(endpointUrl, "invoker/" + clazz.getName() + ".service").toString());
}
catch( MalformedURLException e )
{
throw new RuntimeException(e);
}
factory.setServiceInterface(clazz);
factory.setHttpInvokerRequestExecutor(new PluginAwareSimpleHttpInvokerRequestExecutor());
factory.afterPropertiesSet();
return (T) factory.getObject();
}
示例3: instantiateAndRunSpringRemoting
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
public void instantiateAndRunSpringRemoting() {
HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
httpInvokerProxyFactoryBean.setServiceInterface(org.geoserver.geofence.services.RuleReaderService.class);
httpInvokerProxyFactoryBean.setServiceUrl("http://localhost:9191/geofence/remoting/RuleReader");
httpInvokerProxyFactoryBean.afterPropertiesSet();
RuleReaderService rrs = (RuleReaderService) httpInvokerProxyFactoryBean.getObject();
RuleFilter filter1 = new RuleFilter(SpecialFilterType.DEFAULT, true)
.setUser("pippo")
.setInstance("gs1")
.setService("WMS");
AccessInfo accessInfo = rrs.getAccessInfo(filter1);
LOGGER.info(accessInfo);
RuleFilter filter2 = new RuleFilter(SpecialFilterType.DEFAULT, true)
.setUser("pippo")
.setInstance("gs1")
.setService("WCS");
AccessInfo accessInfo2 = rrs.getAccessInfo(filter2);
LOGGER.info(accessInfo2);
}
示例4: createProxy
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public static <T> T createProxy(Class<T> api, URL url)
{
HttpInvokerProxyFactoryBean factory = new HttpInvokerProxyFactoryBean();
factory.setServiceUrl(url.toString());
factory.setServiceInterface(api);
AbstractHttpInvokerRequestExecutor requestExecutor = new PluginAwareSimpleHttpInvokerRequestExecutor();
factory.setHttpInvokerRequestExecutor(requestExecutor);
factory.setBeanClassLoader(api.getClassLoader());
factory.afterPropertiesSet();
return (T) factory.getObject();
}