本文整理了Java中org.simpleframework.http.Request.getClientAddress
方法的一些代码示例,展示了Request.getClientAddress
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getClientAddress
方法的具体详情如下:
包路径:org.simpleframework.http.Request
类名称:Request
方法名:getClientAddress
[英]This is used to acquire the remote client address. This can be used to acquire both the port and the I.P address for the client. It allows the connected clients to be logged and if require it can be used to perform course grained security.
[中]这用于获取远程客户端地址。这可以用来获取客户端的端口和IP地址。它允许记录连接的客户端,如果需要,可以使用它来执行课程粒度的安全性。
代码示例来源:origin: mpetazzoni/ttorrent
myRequestProcessor.process(request.getAddress().toString(), request.getClientAddress().getAddress().getHostAddress(),
getRequestHandler(response));
} else {
myMultiAnnounceRequestProcessor.process(request.getContent(), request.getAddress().toString(),
request.getClientAddress().getAddress().getHostAddress(), getRequestHandler(response));
代码示例来源:origin: org.simpleframework/simple-http
/**
* This is used to acquire the remote client address. This can
* be used to acquire both the port and the I.P address for the
* client. It allows the connected clients to be logged and if
* require it can be used to perform course grained security.
*
* @return this returns the client address for this request
*/
public InetSocketAddress getClientAddress() {
return request.getClientAddress();
}
代码示例来源:origin: ngallagher/simpleframework
/**
* This is used to acquire the remote client address. This can
* be used to acquire both the port and the I.P address for the
* client. It allows the connected clients to be logged and if
* require it can be used to perform course grained security.
*
* @return this returns the client address for this request
*/
public InetSocketAddress getClientAddress() {
return request.getClientAddress();
}
代码示例来源:origin: org.simpleframework/simple
/**
* This is used to acquire the remote client address. This can
* be used to acquire both the port and the I.P address for the
* client. It allows the connected clients to be logged and if
* require it can be used to perform course grained security.
*
* @return this returns the client address for this request
*/
public InetSocketAddress getClientAddress() {
return request.getClientAddress();
}
代码示例来源:origin: CodeStory/fluent-http
@Override
public InetSocketAddress clientAddress() {
return request.getClientAddress();
}
代码示例来源:origin: miltonio/milton2
public String getRemoteAddr() {
InetSocketAddress add = baseRequest.getClientAddress();
if (add == null) {
return null;
} else {
return add.getHostName();
}
}
}
代码示例来源:origin: restx/restx
@Override
public String getLocalClientAddress() {
return request.getClientAddress().getAddress().getHostAddress();
}
代码示例来源:origin: org.restlet/org.restlet.ext.simple
@Override
public String getClientAddress() {
return this.request.getClientAddress().getAddress().getHostAddress();
}
代码示例来源:origin: io.restx/restx-server-simple
@Override
public String getLocalClientAddress() {
return request.getClientAddress().getAddress().getHostAddress();
}
代码示例来源:origin: tdelenikas/smslib
String ip = request.getClientAddress().getAddress().toString().substring(1);
String path = request.getPath().toString();
logger.debug(String.format("IP: %s, PATH: %s", ip, path));
代码示例来源:origin: opendedup/sdfs
sessions.put(sessionid, request.getClientAddress().getHostString());
Element result = doc.getDocumentElement();
result.setAttribute("status", "success");
内容来源于网络,如有侵权,请联系作者删除!