• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ResourceManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.cxf.resource.ResourceManager的典型用法代码示例。如果您正苦于以下问题:Java ResourceManager类的具体用法?Java ResourceManager怎么用?Java ResourceManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResourceManager类属于org.apache.cxf.resource包,在下文中一共展示了ResourceManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
public void init(ServletConfig sc) throws ServletException {
	// Setting this property because otherwise a file named
	// "wsdl.properties" will be read from the JRE, which is not possible
	// due to restrictive permissions
	System.setProperty("javax.wsdl.factory.WSDLFactory", "com.ibm.wsdl.factory.WSDLFactoryImpl");

	if (this.bus == null) {
		loadBus(sc);
	}
	loader = bus.getExtension(ClassLoader.class);
	ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
	resourceManager.addResourceResolver(new ServletContextResourceResolver(sc.getServletContext()));

	if (destinationRegistry == null) {
		this.destinationRegistry = getDestinationRegistryFromBus(this.bus);
	}
	this.controller = createServletController(sc);

	redirectList = parseListSequence(sc.getInitParameter(REDIRECTS_PARAMETER));
	redirectQueryCheck = Boolean.valueOf(sc.getInitParameter(REDIRECT_QUERY_CHECK_PARAMETER));
	dispatcherServletName = sc.getInitParameter(REDIRECT_SERVLET_NAME_PARAMETER);
	dispatcherServletPath = sc.getInitParameter(REDIRECT_SERVLET_PATH_PARAMETER);
}
 
开发者ID:opensourceBIM,项目名称:BIMserver,代码行数:24,代码来源:GenericWebServiceServlet.java


示例2: setupHandlers

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
protected void setupHandlers(ClientFactoryBean factoryBean, Client client) 
    throws Exception {

    if (factoryBean instanceof JaxWsClientFactoryBean && handlers != null) {
        AnnotationHandlerChainBuilder
            builder = new AnnotationHandlerChainBuilder();
        Method m = factoryBean.getClass().getMethod("getServiceFactory");
        JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)m.invoke(factoryBean);
        @SuppressWarnings("rawtypes")
        List<Handler> chain = new ArrayList<Handler>(handlers);

        chain.addAll(builder.buildHandlerChainFromClass(sf.getServiceClass(),
                                                        sf.getEndpointInfo().getName(),
                                                        sf.getServiceQName(),
                                                        factoryBean.getBindingId()));

        if (!chain.isEmpty()) {
            ResourceManager resourceManager = getBus().getExtension(ResourceManager.class);
            List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
            resourceManager = new DefaultResourceManager(resolvers);
            resourceManager.addResourceResolver(new WebServiceContextResourceResolver());
            ResourceInjector injector = new ResourceInjector(resourceManager);
            for (Handler<?> h : chain) {
                if (Proxy.isProxyClass(h.getClass()) && getServiceClass() != null) {
                    injector.inject(h, getServiceClass());
                    injector.construct(h, getServiceClass());
                } else {
                    injector.inject(h);
                    injector.construct(h);
                }
            }
        }

        ((JaxWsEndpointImpl)client.getEndpoint()).getJaxwsBinding().setHandlerChain(chain);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:37,代码来源:CxfEndpoint.java


示例3: updateAvailableBusWithServletInfo

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
private void updateAvailableBusWithServletInfo(ServletConfig servletConfig)
{
   BusHolder holder = endpoint.getService().getDeployment().getAttachment(BusHolder.class);
   //set the bus from deployment into the CXF servlet and assign it to the current thread (do not touch the default bus!)
   bus = holder.getBus();
   BusFactory.setThreadDefaultBus(bus);
   //update the resource manager adding the ServletContextResourceResolver that was to be added by CXF servlet
   ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
   resourceManager.addResourceResolver(new ServletContextResourceResolver(servletConfig.getServletContext()));
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:11,代码来源:CXFServletExt.java


示例4: setResourceResolver

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
protected static void setResourceResolver(Bus bus, ResourceResolver resourceResolver)
{
   if (resourceResolver != null)
   {
      bus.getExtension(ResourceManager.class).addResourceResolver(resourceResolver);
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:8,代码来源:BusHolder.java


示例5: afterPropertiesSet

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
    this.bus.getExtension(ResourceManager.class).addResourceResolver(new ServletContextResourceResolver(this.servletConfig.getServletContext()));

    this.servletController =
        new ServiceServletController(((HTTPTransportFactory) this.bus.getExtension(DestinationFactoryManager.class).getDestinationFactoryForUri(
            HTTPTransportFactory.DEFAULT_NAMESPACES.get(0))).getRegistry());
}
 
开发者ID:esacinc,项目名称:crigtt,代码行数:9,代码来源:ServiceController.java


示例6: injectCxfResources

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
private ResourceInjector injectCxfResources(final Object implementor) {
    ResourceManager resourceManager = bus.getExtension(ResourceManager.class);

    final List<ResourceResolver> resolvers = resourceManager.getResourceResolvers();
    resourceManager = new DefaultResourceManager(resolvers);
    if (!resourceManager.getResourceResolvers().contains(WEB_SERVICE_CONTEXT_RESOURCE_RESOLVER)) {
        resourceManager.addResourceResolver(WEB_SERVICE_CONTEXT_RESOURCE_RESOLVER);
    }

    final ResourceInjector injector = new ResourceInjector(resourceManager);
    injector.inject(implementor);
    return injector;
}
 
开发者ID:apache,项目名称:tomee,代码行数:14,代码来源:PojoEndpoint.java


示例7: ContextClassLoaderResourceResolver

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
public ContextClassLoaderResourceResolver(Bus bus) {
    bus.getExtension(ResourceManager.class).addResourceResolver(this);
}
 
开发者ID:kantega,项目名称:respiro,代码行数:4,代码来源:ContextClassLoaderResourceResolver.java


示例8: initializeBus

import org.apache.cxf.resource.ResourceManager; //导入依赖的package包/类
protected void initializeBus(Bus bus) {
   super.initializeBus(bus);
   final ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
   resourceManager.addResourceResolver(JBossWSResourceInjectionResolver.getInstance());
   SecurityProviderConfig.setup(bus);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:7,代码来源:JBossWSBusFactory.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DescribeSnapshotsResult类代码示例发布时间:2022-05-23
下一篇:
Java RemoveAclRequestProto类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap