本文整理了Java中org.apache.catalina.connector.Request.setAttribute
方法的一些代码示例,展示了Request.setAttribute
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setAttribute
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:setAttribute
[英]Set the specified request attribute to the specified value.
[中]将指定的请求属性设置为指定的值。
代码示例来源:origin: org.glassfish.main.web/web-core
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(rb.getString(LogFacade.CANNOT_USE_REQUEST_OBJECT_OUTSIDE_SCOPE_EXCEPTION));
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.jboss.web/jbossweb
public void setAttribute(String name, Object o) {
if (request == null) {
throw MESSAGES.nullRequestFacade();
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
@Override
public void invoke(final Request request, final Response response) throws IOException, ServletException {
// we should have our own interceptor chain here and call it to enforce the profile
request.setAttribute(ProfileMappingManager.ProfileMappingMetaData.class.getName(), profileMappingMetaData);
request.setAttribute(ProfileMapping.Mode.class.getName(), mode);
getNext().invoke(request, response);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: tomcat/catalina
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: jboss.web/jbossweb
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public void setAttribute(String name, Object o) {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
request.setAttribute(name, o);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public void setTimeout(int timeout) throws IOException, ServletException,
UnsupportedOperationException {
if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) {
request.setAttribute("org.apache.tomcat.comet.timeout", Integer.valueOf(timeout));
if (request.isComet()) {
request.setCometTimeout(timeout);
}
} else {
throw new UnsupportedOperationException();
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
public void setTimeout(int timeout) throws IOException, ServletException,
UnsupportedOperationException {
if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) {
request.setAttribute("org.apache.tomcat.comet.timeout", Integer.valueOf(timeout));
if (request.isComet()) request.setCometTimeout(timeout);
} else {
throw new UnsupportedOperationException();
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public void setTimeout(int timeout) throws IOException, ServletException,
UnsupportedOperationException {
if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) {
request.setAttribute("org.apache.tomcat.comet.timeout", Integer.valueOf(timeout));
if (request.isComet()) request.setCometTimeout(timeout);
} else {
throw new UnsupportedOperationException();
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
public void setTimeout(int timeout) throws IOException, ServletException,
UnsupportedOperationException {
if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) {
request.setAttribute("org.apache.tomcat.comet.timeout", Integer.valueOf(timeout));
if (request.isComet()) request.setCometTimeout(timeout);
} else {
throw new UnsupportedOperationException();
}
}
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
@Override
public void setName(final String name) {
super.setName(name);
request.setAttribute(TRIBE_PRINCIPAL_NAME_ATTRIBUTE, name);
RequestContext requestContext = RequestContext.fromRequest(request);
if (requestContext != null) {
requestContext.getIn().getAttributes().put(TRIBE_PRINCIPAL_NAME_ATTRIBUTE, name);
}
}
};
代码示例来源:origin: org.keycloak/keycloak-tomcat-core-adapter
@Override
protected void completeBearerAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal, String method) {
RefreshableKeycloakSecurityContext securityContext = principal.getKeycloakSecurityContext();
Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
if (log.isLoggable(Level.FINE)) {
log.fine("Completing bearer authentication. Bearer roles: " + roles);
}
Principal generalPrincipal = principalFactory.createPrincipal(request.getContext().getRealm(), principal, roles);
request.setUserPrincipal(generalPrincipal);
request.setAuthType(method);
request.setAttribute(KeycloakSecurityContext.class.getName(), securityContext);
}
代码示例来源:origin: org.keycloak/spring-boot-container-bundle
@Override
protected void completeBearerAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal, String method) {
RefreshableKeycloakSecurityContext securityContext = principal.getKeycloakSecurityContext();
Set<String> roles = AdapterUtils.getRolesFromSecurityContext(securityContext);
if (log.isLoggable(Level.FINE)) {
log.fine("Completing bearer authentication. Bearer roles: " + roles);
}
Principal generalPrincipal = principalFactory.createPrincipal(request.getContext().getRealm(), principal, roles);
request.setUserPrincipal(generalPrincipal);
request.setAuthType(method);
request.setAttribute(KeycloakSecurityContext.class.getName(), securityContext);
}
内容来源于网络,如有侵权,请联系作者删除!