本文整理了Java中org.restlet.Response.getDimensions
方法的一些代码示例,展示了Response.getDimensions
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getDimensions
方法的具体详情如下:
包路径:org.restlet.Response
类名称:Response
方法名:getDimensions
[英]Returns the modifiable set of selecting dimensions on which the response entity may vary. If some server-side content negotiation is done, this set should be properly updated, other it can be left empty. Creates a new instance if no one has been set.
Note that when used with HTTP connectors, this property maps to the "Vary" header.
[中]返回可修改的选择维度集,响应实体可能会在这些维度上发生变化。如果完成了某些服务器端内容协商,则应正确更新此集合,否则可以将其保留为空。如果未设置任何实例,则创建新实例。
请注意,当与HTTP连接器一起使用时,此属性映射到“Vary”头。
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the set of dimensions on which the response entity may vary. Note
* that when used with HTTP connectors, this property maps to the "Vary"
* header. This method clears the current set and adds all entries in the
* parameter set.
*
* @param dimensions
* The set of dimensions on which the response entity may vary.
*/
public void setDimensions(Set<Dimension> dimensions) {
synchronized (getDimensions()) {
if (dimensions != getDimensions()) {
getDimensions().clear();
if (dimensions != null) {
getDimensions().addAll(dimensions);
}
}
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the set of selecting dimensions on which the response entity may
* vary. If some server-side content negotiation is done, this set should be
* properly updated, other it can be left empty.
*
* @return The set of dimensions on which the response entity may vary.
*/
@Override
public Set<Dimension> getDimensions() {
return getWrappedResponse().getDimensions();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the modifiable set of selecting dimensions on which the response
* entity may vary. If some server-side content negotiation is done, this
* set should be properly updated, other it can be left empty. Creates a new
* instance if no one has been set.
*
* @return The set of dimensions on which the response entity may vary.
* @see Response#getDimensions()
*/
public Set<Dimension> getDimensions() {
return getResponse() == null ? null : getResponse().getDimensions();
}
代码示例来源:origin: org.restlet.jee/org.restlet.ext.jaxrs
dimensions = org.restlet.Response.getCurrent().getDimensions();
if (encodings.size() > 1) {
dimensions.add(Dimension.ENCODING);
代码示例来源:origin: org.restlet.jee/org.restlet.ext.jaxrs
metadataService);
Variant bestVariant = Converter.toJaxRsVariant(bestRestlVar);
Set<Dimension> dimensions = this.response.getDimensions();
代码示例来源:origin: org.restlet.osgi/org.restlet
MethodReader.addValues(header, response.getAllowedMethods());
} else if (HEADER_VARY.equalsIgnoreCase(header.getName())) {
DimensionReader.addValues(header, response.getDimensions());
} else if (HEADER_VIA.equalsIgnoreCase(header.getName())) {
RecipientInfoReader.addValues(header, response.getRecipientsInfo());
代码示例来源:origin: org.restlet.osgi/org.restlet
.getRequest().getClientInfo().getAgent().contains("MSIE"))) {
addHeader(HEADER_VARY, DimensionWriter.write(response.getDimensions()), headers);
内容来源于网络,如有侵权,请联系作者删除!