org.apache.catalina.Wrapper.getRunAs()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(210)

本文整理了Java中org.apache.catalina.Wrapper.getRunAs()方法的一些代码示例,展示了Wrapper.getRunAs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.getRunAs()方法的具体详情如下:
包路径:org.apache.catalina.Wrapper
类名称:Wrapper
方法名:getRunAs

Wrapper.getRunAs介绍

[英]Return the run-as identity for this servlet.
[中]返回此servlet的运行方式标识。

代码示例

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: codefollower/Tomcat-Research

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

@Override
public String getRunAsRole() {
  return wrapper.getRunAs();
}

代码示例来源:origin: psi-probe/psi-probe

si.setAvailable(!wrapper.isUnavailable());
si.setLoadOnStartup(wrapper.getLoadOnStartup());
si.setRunAs(wrapper.getRunAs());
si.getMappings().addAll(Arrays.asList(wrapper.findMappings()));
if (wrapper instanceof StandardWrapper) {

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

/**
 * Determine if the context has at least one servlet that specifies a run-as role
 * @return true if at least one servlet specifies a run-as role, false otherwise
 */
protected boolean hasRunAsServlet() {
  for (Container servlet : findChildren()) { 
    if (servlet instanceof Wrapper) {
      if (((Wrapper)servlet).getRunAs() != null) {
        return true;
      }
    }
  }
  return false;
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

public void instanceEvent(InstanceEvent event) {

    if (event.getType().equals(InstanceEvent.BEFORE_SERVICE_EVENT)) {
      Container parent = event.getWrapper().getParent();
      if (parent instanceof GeronimoStandardContext) {
        Stack<Callers> callersStack = threadLocal.get();
        GeronimoStandardContext context = (GeronimoStandardContext) parent;
        Wrapper wrapper = event.getWrapper();
        String runAsRole = wrapper.getRunAs();
        Subject runAsSubject = context.getSubjectForRole(runAsRole);
        Callers oldCallers = ContextManager.pushNextCaller(runAsSubject);
        callersStack.push(oldCallers);
      }
    } else if (event.getType().equals(InstanceEvent.AFTER_SERVICE_EVENT)) {
      Container parent = event.getWrapper().getParent();
      if (parent instanceof GeronimoStandardContext) {
        Stack<Callers> callersStack = threadLocal.get();
        Callers oldCallers = callersStack.pop();
        ContextManager.popCallers(oldCallers);
      }
    }
  }
}

代码示例来源:origin: org.glassfish.main.web/web-core

for (int i = 0; i < wrappers.length; i++) {
  Wrapper wrapper = (Wrapper) wrappers[i];
  String runAs = wrapper.getRunAs();
  if ((runAs != null) && !context.hasSecurityRole(runAs)) {
    if (log.isLoggable(Level.INFO)) {

代码示例来源:origin: org.apache.openejb/tomee-catalina

public void enter() {
  if (securityService != null && request.getWrapper() != null) {
    oldState = securityService.enterWebApp(request.getWrapper().getRealm(), request.getPrincipal(), request.getWrapper().getRunAs());
  }
}

代码示例来源:origin: org.apache.tomee/tomee-catalina

public void enter() {
  if (securityService != null && request.getWrapper() != null) {
    oldState = securityService.enterWebApp(request.getWrapper().getRealm(), request.getPrincipal(), request.getWrapper().getRunAs());
  }
}

代码示例来源:origin: org.apache.tomee/tomee-catalina

final Object securityContext = securityService.enterWebApp(this, pcp, OpenEJBSecurityListener.requests.get().getWrapper().getRunAs());
  request.setNote(SECURITY_NOTE, securityContext);
} else {

代码示例来源:origin: jboss.web/jbossweb

for (int i = 0; i < wrappers.length; i++) {
  Wrapper wrapper = (Wrapper) wrappers[i];
  String runAs = wrapper.getRunAs();
  if ((runAs != null) && !context.findSecurityRole(runAs)) {
    log.info(sm.getString("contextConfig.role.runas", runAs));

代码示例来源:origin: org.apache.openejb/openejb-tomcat-catalina

public void invoke(Request request, Response response) throws IOException, ServletException {
  Object oldState = null;
  if (securityService != null && request.getWrapper() != null) {
    oldState = securityService.enterWebApp(request.getWrapper().getRealm(), request.getPrincipal(), request.getWrapper().getRunAs());
  }
  try {
    getNext().invoke(request, response);
  } finally {
    if (securityService != null) {
      securityService.exitWebApp(oldState);
    }
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

for (int i = 0; i < wrappers.length; i++) {
  Wrapper wrapper = (Wrapper) wrappers[i];
  String runAs = wrapper.getRunAs();
  if ((runAs != null) && !context.findSecurityRole(runAs)) {
    log.warn(sm.getString("contextConfig.role.runas", runAs));

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

for (int i = 0; i < wrappers.length; i++) {
  Wrapper wrapper = (Wrapper) wrappers[i];
  String runAs = wrapper.getRunAs();
  if ((runAs != null) && !context.findSecurityRole(runAs)) {
    log.info(sm.getString("contextConfig.role.runas", runAs));

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

for (int i = 0; i < wrappers.length; i++) {
  Wrapper wrapper = (Wrapper) wrappers[i];
  String runAs = wrapper.getRunAs();
  if ((runAs != null) && !context.findSecurityRole(runAs)) {
    log.warn(sm.getString("contextConfig.role.runas", runAs));

相关文章