本文整理汇总了Java中org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor方法的典型用法代码示例。如果您正苦于以下问题:Java HttpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor方法的具体用法?Java HttpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor怎么用?Java HttpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean
的用法示例。
在下文中一共展示了HttpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}
示例4: httpInvokerProxy
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public HttpInvokerProxyFactoryBean httpInvokerProxy() throws Exception {
HttpInvokerProxyFactoryBean proxyFactory = new HttpInvokerProxyFactoryBean();
proxyFactory.setServiceUrl("https://localhost:8443/rpc/account");
proxyFactory.setServiceInterface(AccountService.class);
proxyFactory.setHttpInvokerRequestExecutor(http2InvokerRequestExecutor());
return proxyFactory;
}
示例5: userService
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public HttpInvokerProxyFactoryBean userService() {
HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
httpInvokerProxyFactoryBean.setServiceInterface(UserService.class);
httpInvokerProxyFactoryBean.setServiceUrl(coreServiceUrl + "/remoting/userService_v1");
httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(customHttpInvokerRequestExecutor());
return httpInvokerProxyFactoryBean;
}
示例6: translationService
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean; //导入方法依赖的package包/类
@Bean
public HttpInvokerProxyFactoryBean translationService() {
HttpInvokerProxyFactoryBean httpInvokerProxyFactoryBean = new HttpInvokerProxyFactoryBean();
httpInvokerProxyFactoryBean.setServiceInterface(TranslationService.class);
httpInvokerProxyFactoryBean.setServiceUrl(coreServiceUrl + "/remoting/translationService_v1");
httpInvokerProxyFactoryBean.setHttpInvokerRequestExecutor(customHttpInvokerRequestExecutor());
return httpInvokerProxyFactoryBean;
}