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

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

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

Request.getLocalPort介绍

暂无

代码示例

代码示例来源:origin: jphp-group/jphp

@Signature
public int localPort() {
  return request.getLocalPort();
}

代码示例来源:origin: AsyncHttpClient/async-http-client

@Override
 public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
  if (request.getLocalPort() == port2) {
   httpServletResponse.sendRedirect(getTargetUrl());
  }
 }
});

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

@Override
  public void handle(String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
    if (request.getLocalPort() == port2) {
      httpServletResponse.sendRedirect(getTargetUrl());
    }
  }
});

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

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

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

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

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

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

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

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

代码示例来源:origin: Nextdoor/bender

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

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

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

代码示例来源:origin: Nextdoor/bender

String name=(String)request.getAttribute("org.eclipse.jetty.thread.name");
if (name==null)
  name=old_name+":"+baseRequest.getScheme()+"://"+baseRequest.getLocalAddr()+":"+baseRequest.getLocalPort()+baseRequest.getUri();
else
  retry=true;

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

private int findServerPort()
{
  // Return host from header field
  HttpField host = _metadata.getFields().getField(HttpHeader.HOST);
  if (host!=null)
  {
    // TODO is this needed now?
    HostPortHttpField authority = (host instanceof HostPortHttpField)
      ?((HostPortHttpField)host)
      :new HostPortHttpField(host.getValue());
    _metadata.getURI().setAuthority(authority.getHost(),authority.getPort());
    return authority.getPort();
  }
  // Return host from connection
  if (_channel != null)
    return getLocalPort();
  return -1;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

_port = getLocalPort();
if (_serverName != null && !StringUtil.ALL_INTERFACES.equals(_serverName))
  return _serverName;

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

private int findServerPort()
{
  MetaData.Request metadata = _metaData;
  // Return host from header field
  HttpField host = metadata==null?null:metadata.getFields().getField(HttpHeader.HOST);
  if (host!=null)
  {
    // TODO is this needed now?
    HostPortHttpField authority = (host instanceof HostPortHttpField)
      ?((HostPortHttpField)host)
      :new HostPortHttpField(host.getValue());
    metadata.getURI().setAuthority(authority.getHost(),authority.getPort());
    return authority.getPort();
  }
  // Return host from connection
  if (_channel != null)
    return getLocalPort();
  return -1;
}

代码示例来源:origin: com.yahoo.vespa/jdisc_http_service

accessLogEntry.setLocalPort(request.getLocalPort());
Principal principal = (Principal) request.getAttribute(ServletRequest.JDISC_REQUEST_PRINCIPAL);
if (principal != null) {

相关文章

Request类方法