本文整理了Java中org.eclipse.jetty.server.Request.getLocalPort
方法的一些代码示例,展示了Request.getLocalPort
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getLocalPort
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称: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) {
内容来源于网络,如有侵权,请联系作者删除!