当前位置: 首页>>代码示例>>Java>>正文


Java HttpInvokerProxyFactoryBean.afterPropertiesSet方法代码示例

本文整理汇总了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();
}
 
开发者ID:equella,项目名称:Equella,代码行数:20,代码来源:ClientLauncher.java

示例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();
}
 
开发者ID:equella,项目名称:Equella,代码行数:18,代码来源:Bootstrap.java

示例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);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:22,代码来源:MainTest.java

示例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();
}
 
开发者ID:equella,项目名称:Equella,代码行数:13,代码来源:ClientProxyFactory.java


注:本文中的org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean.afterPropertiesSet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。