本文整理汇总了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;未经允许,请勿转载。 |
请发表评论