org.glassfish.grizzly.http.server.Request.setRequestParameters()方法的使用及代码示例

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

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

Request.setRequestParameters介绍

[英]This method may be used if some other entity processed request parameters and wishes to expose them via the request. When this method is called, it will mark the internal request parameter state as having been processed.
[中]如果其他实体处理了请求参数,并希望通过请求公开这些参数,则可以使用此方法。调用此方法时,它会将内部请求参数状态标记为已处理。

代码示例

代码示例来源:origin: javaee/grizzly

@Override
public void completed(final Request request) {
  // Resume the asynchronous HTTP request processing
  // (in other words finish the asynchronous HTTP request processing).
  request.setRequestParameters(formParams);
  servletRequest.setAttribute(UPLOADED_FILES, uploadedFiles.toArray(new File[uploadedFiles.size()]));
  try {
    filterChain.doFilter(servletRequest, servletResponse);
  } catch (Exception e) {
    LOGGER.log(Level.SEVERE, e.toString(), e);
  } finally {
    if (deleteAfterRequestEnd) {
      clean(dir);
    }
    response.resume();
  }
}

代码示例来源:origin: javaee/grizzly

@Override
public void completed(final Request request) {
  // Resume the asynchronous HTTP request processing
  // (in other words finish the asynchronous HTTP request processing).
  request.setRequestParameters(formParams);
  servletRequest.setAttribute(UPLOADED_FILES, uploadedFiles.toArray(new File[uploadedFiles.size()]));
  try {
    filterChain.doFilter(servletRequest, servletResponse);
  } catch (Exception e) {
    LOGGER.log(Level.SEVERE, e.toString(), e);
  } finally {
    if (deleteAfterRequestEnd) {
      clean(dir);
    }
    response.resume();
  }
}

相关文章

Request类方法