org.apache.catalina.connector.Request.getRequest()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(225)

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

Request.getRequest介绍

[英]Return the ServletRequest for which this object is the facade. This method must be implemented by a subclass.
[中]返回此对象作为其外观的ServletRequest。此方法必须由子类实现。

代码示例

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
 getNext().invoke(request, response);
 if (request.getSession(false) != null) {
  String ip = IpInfo.getClientAddress(request.getRequest());
  // Explicit calls to ensure result not lost
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_BY_IP, ip);
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_LOCALE,
    request.getLocale());
 }
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
 getNext().invoke(request, response);
 if (request.getSession(false) != null) {
  String ip = IpInfo.getClientAddress(request.getRequest());
  // Explicit calls to ensure result not lost
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_BY_IP, ip);
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_LOCALE,
    request.getLocale());
 }
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
 getNext().invoke(request, response);
 if (request.getSession(false) != null) {
  String ip = IpInfo.getClientAddress(request.getRequest());
  // Explicit calls to ensure result not lost
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_BY_IP, ip);
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_LOCALE,
    request.getLocale());
 }
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
 getNext().invoke(request, response);
 if (request.getSession(false) != null) {
  String ip = IpInfo.getClientAddress(request.getRequest());
  // Explicit calls to ensure result not lost
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_BY_IP, ip);
  request.getSession(false).setAttribute(ApplicationSession.LAST_ACCESSED_LOCALE,
    request.getLocale());
 }
}

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

/**
 * Alias for AsyncContext inner class.
 */
public HttpServletRequest getRequestFacade() {
  return getRequest();
}

代码示例来源:origin: apache/flex-blazeds

private boolean servletRequestMatches(HttpServletRequest servletRequest)
{
  return request != null && request.getRequest() == servletRequest;
}
/** {@inheritDoc} */

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

/**
 * Gets the <code>ServletRequest</code> for which this object
 * is the facade. This method must be implemented by a subclass.
 */
@Override
public HttpServletRequest getRequest() {
  return getRequest(false);
}

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

/**
 * Alias for AsyncContext inner class.
 */
public HttpServletRequest getRequestFacade() {
  return getRequest();
}

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

@Override
  public void invoke(final Request request, final Response response) throws IOException, ServletException {
    request.getRequest().setAttribute(KEY, getContainer());
    try {
      getNext().invoke(request, response);
    } finally {
      request.getRequest().removeAttribute(KEY);
    }
  }
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
  String property;
  if (getAddConnectorPort()) {
    property = request.getRequest().getRemoteAddr() + ";" +
        request.getConnector().getPortWithOffset();
  } else {
    property = request.getRequest().getRemoteAddr();
  }
  process(property, request, response);
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
  String property;
  if (getAddConnectorPort()) {
    property = request.getRequest().getRemoteHost() + ";" +
        request.getConnector().getPortWithOffset();
  } else {
    property = request.getRequest().getRemoteHost();
  }
  process(property, request, response);
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
  String property;
  if (getAddConnectorPort()) {
    property = request.getRequest().getRemoteAddr() + ";" + request.getConnector().getPort();
  } else {
    property = request.getRequest().getRemoteAddr();
  }
  process(property, request, response);
}

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

@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
  String property;
  if (getAddConnectorPort()) {
    property = request.getRequest().getRemoteHost() + ";" + request.getConnector().getPort();
  } else {
    property = request.getRequest().getRemoteHost();
  }
  process(property, request, response);
}

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

@Override
public AsyncContext startAsync() {
  return startAsync(getRequest(),response.getResponse());
}

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

/**
 * Starts async processing on this request.
 */
@Override
public AsyncContext startAsync() throws IllegalStateException {
  return startAsync(getRequest(), getResponse().getResponse(), true);
}

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

@Override
public void invoke(final Request request, final Response response) throws IOException, ServletException {
  if (isAllowed(request.getRequest().getRemoteAddr())) {
    getNext().invoke(request, response);
  } else {
    response.sendError(HttpServletResponse.SC_FORBIDDEN);
  }
}

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

@Override
public boolean hasResourcePermission(final Request request, final Response response,
                   final SecurityConstraint[] constraint,
                   final Context context) throws IOException {
  return (Boolean) invoke(hasResourcePermissionMethod, request.getRequest(), response.getResponse(), constraint, context.getPath());
}

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

@Override
public void invoke(final Request request, final Response response) throws IOException, ServletException {
  if (isAllowed(request.getRequest().getRemoteAddr())) {
    getNext().invoke(request, response);
  } else {
    response.sendError(HttpServletResponse.SC_FORBIDDEN);
  }
}

代码示例来源:origin: org.picketlink/picketlink-tomcat-common

private void forwardHosted(Request request, Response response) throws ServletException, IOException {
  logger.trace("SAML 1.1::Proceeding to IDP index page");
  RequestDispatcher dispatch = getContext().getServletContext()
    .getRequestDispatcher(getIdpConfiguration().getHostedURI());
  recycle(response);
  try {
    includeResource(request, response, dispatch);
  } catch (ClassCastException cce) {
    // JBAS5.1 and 6 quirkiness
    includeResource(request.getRequest(), response, dispatch);
  }
}

代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7

private void forwardHosted(Request request, Response response) throws ServletException, IOException {
  logger.trace("SAML 1.1::Proceeding to IDP index page");
  RequestDispatcher dispatch = getContext().getServletContext()
    .getRequestDispatcher(getIdpConfiguration().getHostedURI());
  recycle(response);
  try {
    includeResource(request, response, dispatch);
  } catch (ClassCastException cce) {
    // JBAS5.1 and 6 quirkiness
    includeResource(request.getRequest(), response, dispatch);
  }
}

相关文章

Request类方法