本文整理了Java中javax.ws.rs.container.ContainerRequestContext.getPropertyNames()
方法的一些代码示例,展示了ContainerRequestContext.getPropertyNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ContainerRequestContext.getPropertyNames()
方法的具体详情如下:
包路径:javax.ws.rs.container.ContainerRequestContext
类名称:ContainerRequestContext
方法名:getPropertyNames
[英]Returns an immutable java.util.Collection containing the property names available within the context of the current request/response exchange context.
Use the #getProperty method with a property name to get the value of a property.
In a Servlet container, the properties are synchronized with the ServletRequestand expose all the attributes available in the ServletRequest. Any modifications of the properties are also reflected in the set of properties of the associated ServletRequest.
[中]返回一个不可变的java。util。包含在当前请求/响应交换上下文上下文中可用的属性名称的集合。
使用带有属性名称的#getProperty方法获取属性的值。
在Servlet容器中,属性与ServletRequest同步,并公开ServletRequest中可用的所有属性。属性的任何修改也会反映在相关ServletRequest的属性集中。
代码示例来源:origin: jersey/jersey
@Override
public String[] getAttributeNames(int scope) {
if (!isRequestActive()) {
throw new IllegalStateException(LocalizationMessages.NOT_IN_REQUEST_SCOPE());
}
return StringUtils.toStringArray(requestContext.getPropertyNames());
}
代码示例来源:origin: com.yahoo.fili/fili-core
@Override public Collection<String> getPropertyNames() { return request.getPropertyNames(); }
@Override public void setProperty(String name, Object object) { request.setProperty(name, object); }
代码示例来源:origin: yahoo/fili
@Override public Collection<String> getPropertyNames() { return request.getPropertyNames(); }
@Override public void setProperty(String name, Object object) { request.setProperty(name, object); }
代码示例来源:origin: org.glassfish.jersey.ext/jersey-spring4
@Override
public String[] getAttributeNames(int scope) {
if (!isRequestActive()) {
throw new IllegalStateException(LocalizationMessages.NOT_IN_REQUEST_SCOPE());
}
return StringUtils.toStringArray(requestContext.getPropertyNames());
}
代码示例来源:origin: com.expanset.jersey/jersey-mvc
model.put(PRINCIPAL_PROPERTY, request.getSecurityContext() != null ? request.getSecurityContext().getUserPrincipal() : null);
model.put(RESOURCE_BUNDLE_PROPERTY, resourceBundleProvider.get());
for(String propertyName : request.getPropertyNames()) {
model.put(propertyName, request.getProperty(propertyName));
内容来源于网络,如有侵权,请联系作者删除!