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

Java ResourceContext类代码示例

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

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



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

示例1: Item

import com.sun.jersey.api.core.ResourceContext; //导入依赖的package包/类
public Item(@Context UriInfo uriInfo, @Context Request request, @Context MediaTypes mediaTypes,
           @Context SPARQLEndpoint sparqlEndpoint, @Context GraphStore graphStore,
           @Context com.atomgraph.processor.model.Application application, @Context Ontology ontology, @Context TemplateCall templateCall,
           @Context HttpHeaders httpHeaders, @Context ResourceContext resourceContext)
   {
super(uriInfo, request, mediaTypes,
               sparqlEndpoint, graphStore,
               application, ontology, templateCall,
               httpHeaders, resourceContext);
if (log.isDebugEnabled()) log.debug("Constructing {} as direct indication of GRAPH {}", getClass(), uriInfo.getAbsolutePath());
   }
 
开发者ID:AtomGraph,项目名称:Processor,代码行数:12,代码来源:Item.java


示例2: ResourceBase

import com.sun.jersey.api.core.ResourceContext; //导入依赖的package包/类
protected ResourceBase(final UriInfo uriInfo, final Request request, final MediaTypes mediaTypes, final URI uri,
        final SPARQLEndpoint sparqlEndpoint, final GraphStore graphStore,
        final com.atomgraph.processor.model.Application application,
        final Ontology ontology, final TemplateCall templateCall,
        final HttpHeaders httpHeaders, final ResourceContext resourceContext)
{
    super(uriInfo, request, mediaTypes, uri, sparqlEndpoint, graphStore);

    if (templateCall == null)
    {
        if (log.isDebugEnabled()) log.debug("Resource {} has not matched any template Template, returning 404 Not Found", getURI());
        throw new NotFoundException("Resource has not matched any template");
    }
    if (application == null) throw new IllegalArgumentException("Application cannot be null");
    if (ontology == null) throw new IllegalArgumentException("Ontology cannot be null");        
    if (httpHeaders == null) throw new IllegalArgumentException("HttpHeaders cannot be null");
    if (resourceContext == null) throw new IllegalArgumentException("ResourceContext cannot be null");

    // we are not making permanent changes to base ontology because OntologyProvider always makes a copy
    this.application = application;
    this.ontology = ontology;
    this.ontResource = ontology.getOntModel().createOntResource(getURI().toString());
    this.templateCall = templateCall;
    this.httpHeaders = httpHeaders;
    this.resourceContext = resourceContext;
    this.querySolutionMap = templateCall.getQuerySolutionMap();
    this.querySolutionMap.add(SPIN.THIS_VAR_NAME, ontResource); // ?this

    if (log.isDebugEnabled()) log.debug("Constructing ResourceBase with matched Template: {}", templateCall.getTemplate());
}
 
开发者ID:AtomGraph,项目名称:Processor,代码行数:31,代码来源:ResourceBase.java


示例3: ProvidesResource

import com.sun.jersey.api.core.ResourceContext; //导入依赖的package包/类
@Inject
public ProvidesResource(DaggerContainer daggerContainer, WebApplication webApplication, Providers providers,
                        FeaturesAndProperties featuresAndProperties, MessageBodyWorkers messageBodyWorkers,
                        ExceptionMapperContext exceptionMapperContext, ResourceContext resourceContext) {
    assertNotNull(daggerContainer);
    assertNotNull(webApplication);
    assertNotNull(providers);
    assertNotNull(featuresAndProperties);
    assertNotNull(messageBodyWorkers);
    assertNotNull(exceptionMapperContext);
    assertNotNull(resourceContext);
}
 
开发者ID:johnlcox,项目名称:dagger-servlet,代码行数:13,代码来源:JerseyModuleProvidesTest.java


示例4: getResourceContext

import com.sun.jersey.api.core.ResourceContext; //导入依赖的package包/类
public ResourceContext getResourceContext()
{
    return resourceContext;
}
 
开发者ID:AtomGraph,项目名称:Processor,代码行数:5,代码来源:ResourceBase.java


示例5: provideResourceContext

import com.sun.jersey.api.core.ResourceContext; //导入依赖的package包/类
@Provides
public ResourceContext provideResourceContext(WebApplication webApplication) {
    return webApplication.getResourceContext();
}
 
开发者ID:johnlcox,项目名称:dagger-servlet,代码行数:5,代码来源:JerseyModule.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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