本文整理了Java中org.eclipse.jetty.server.Request.getRemotePort
方法的一些代码示例,展示了Request.getRemotePort
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getRemotePort
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getRemotePort
暂无
代码示例来源:origin: jphp-group/jphp
@Signature
public int remotePort() {
return request.getRemotePort();
}
代码示例来源:origin: org.restlet.jee/org.restlet.ext.jetty
@Override
public int getClientPort() {
return getConnection().getRequest().getRemotePort();
}
代码示例来源:origin: bozaro/git-as-svn
public WebServer(@NotNull SharedContext context, @Nullable Server server, @NotNull WebServerConfig config, @NotNull EncryptionFactory tokenFactory) {
this.context = context;
this.server = server;
this.config = config;
this.tokenFactory = tokenFactory;
if (server != null) {
final ServletContextHandler contextHandler = new ServletContextHandler();
contextHandler.setContextPath("/");
handler = contextHandler.getServletHandler();
final RequestLogHandler logHandler = new RequestLogHandler();
logHandler.setRequestLog((request, response) -> {
final User user = (User) request.getAttribute(User.class.getName());
final String userName = (user == null || user.isAnonymous()) ? "" : user.getUserName();
log.info("{}:{} - {} - \"{} {}\" {} {}", request.getRemoteHost(), request.getRemotePort(), userName, request.getMethod(), request.getHttpURI(), response.getStatus(), response.getReason());
});
final HandlerCollection handlers = new HandlerCollection();
handlers.addHandler(contextHandler);
handlers.addHandler(logHandler);
server.setHandler(handlers);
} else {
handler = null;
}
}
代码示例来源:origin: com.yahoo.vespa/jdisc_http_service
final int remotePort = getRemotePort(request);
final String peerAddress = request.getRemoteAddr();
final int peerPort = request.getRemotePort();
代码示例来源:origin: jenkinsci/winstone
request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
request.setRemoteAddr(new InetSocketAddress(forwardedFor,request.getRemotePort()));
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
request.setRemoteAddr(new InetSocketAddress(forwardedFor,request.getRemotePort()));
代码示例来源:origin: Nextdoor/bender
request.setRemoteAddr(InetSocketAddress.createUnresolved(forwardedFor,request.getRemotePort()));
内容来源于网络,如有侵权,请联系作者删除!