org.eclipse.jetty.server.Request.setMetaData()方法的使用及代码示例

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

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

Request.setMetaData介绍

暂无

代码示例

代码示例来源:origin: line/armeria

private static void fillRequest(
    ServiceRequestContext ctx, AggregatedHttpMessage aReq, Request jReq) {
  jReq.setDispatcherType(DispatcherType.REQUEST);
  jReq.setAsyncSupported(false, "armeria");
  jReq.setSecure(ctx.sessionProtocol().isTls());
  jReq.setMetaData(toRequestMetadata(ctx, aReq));
  final HttpData content = aReq.content();
  if (!content.isEmpty()) {
    jReq.getHttpInput().addContent(new Content(ByteBuffer.wrap(
        content.array(), content.offset(), content.length())));
  }
  jReq.getHttpInput().eof();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server

public void onRequest(MetaData.Request request)
{
  _requests.incrementAndGet();
  _request.setTimeStamp(System.currentTimeMillis());
  HttpFields fields = _response.getHttpFields();
  if (_configuration.getSendDateHeader() && !fields.contains(HttpHeader.DATE))
    fields.put(_connector.getServer().getDateField());
  _request.setMetaData(request);
}

代码示例来源:origin: jenkinsci/winstone

public void onRequest(MetaData.Request request)
{
  _requests.incrementAndGet();
  _request.setTimeStamp(System.currentTimeMillis());
  HttpFields fields = _response.getHttpFields();
  if (_configuration.getSendDateHeader() && !fields.contains(HttpHeader.DATE))
    fields.put(_connector.getServer().getDateField());
  long idleTO=_configuration.getIdleTimeout();
  _oldIdleTimeout=getIdleTimeout();
  if (idleTO>=0 && _oldIdleTimeout!=idleTO)
    setIdleTimeout(idleTO);
  request.setTrailerSupplier(_trailerSupplier);
  _request.setMetaData(request);
  _request.setSecure(HttpScheme.HTTPS.is(request.getURI().getScheme()));
  notifyRequestBegin(_request);
  if (LOG.isDebugEnabled())
    LOG.debug("REQUEST for {} on {}{}{} {} {}{}{}",request.getURIString(),this,System.lineSeparator(),
        request.getMethod(),request.getURIString(),request.getHttpVersion(),System.lineSeparator(),
        request.getFields());
}

相关文章

Request类方法