作者:向日葵哄子 | 来源:互联网 | 2024-09-26 08:35
本文整理了Java中org.restlet.Application.getConnegService()
方法的一些代码示例,展示了Application.getConnegService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.getConnegService()
方法的具体详情如下:
包路径:org.restlet.Application
类名称:Application
方法名:getConnegService
Application.getConnegService介绍
[英]Returns the content negotiation service. The service is enabled by default.
[中]返回内容协商服务。默认情况下,该服务处于启用状态。
代码示例
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the application's content negotiation service or create a new
* one.
*
* @return The content negotiation service.
*/
public org.restlet.service.ConnegService getConnegService() {
org.restlet.service.ConnegService result = null;
result = getApplication().getConnegService();
if (result == null) {
result = new org.restlet.service.ConnegService();
}
return result;
}
代码示例来源:origin: stackoverflow.com
variantList.add(new Variant(MediaType.APPLICATION_JSON));
Variant variant = application.getConnegService().getPreferredVariant(variantList, request, application.getMetadataService());
代码示例来源:origin: org.restlet.jee/org.restlet.ext.jaxrs
metadataService = new MetadataService();
} else {
cOnnegService= app.getConnegService();
metadataService = app.getMetadataService();