org.apache.coyote.Request.remoteAddr()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(353)

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

Request.remoteAddr介绍

暂无

代码示例

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

  1. coyoteReq.remoteAddr().setString(remoteAddr.getAddress().getHostAddress());
  2. coyoteReq.remoteHost().setString(remoteAddr.getHostString());
  3. coyoteReq.setRemotePort(remoteAddr.getPort());

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

  1. /**
  2. * @return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: org.jboss.web/jbossweb

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

代码示例来源:origin: org.jboss.web/jbossweb

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. public String getRemoteAddr() {
  5. if (remoteAddr == null) {
  6. coyoteRequest.action
  7. (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  8. remoteAddr = coyoteRequest.remoteAddr().toString();
  9. }
  10. return remoteAddr;
  11. }

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

代码示例来源:origin: jboss.web/jbossweb

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. public String getRemoteAddr() {
  5. if (remoteAddr == null) {
  6. coyoteRequest.action
  7. (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  8. remoteAddr = coyoteRequest.remoteAddr().toString();
  9. }
  10. return remoteAddr;
  11. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

代码示例来源:origin: tomcat/catalina

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. public String getRemoteAddr() {
  5. if (remoteAddr == null) {
  6. coyoteRequest.action
  7. (ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  8. remoteAddr = coyoteRequest.remoteAddr().toString();
  9. }
  10. return remoteAddr;
  11. }

代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

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

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. /**
  2. * @return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

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

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

  1. /* */ public String getRemoteAddr()
  2. /* */ {
  3. /* 1168 */ if (this.remoteAddr == null) {
  4. /* 1169 */ this.coyoteRequest.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, this.coyoteRequest);
  5. /* */
  6. /* 1171 */ this.remoteAddr = this.coyoteRequest.remoteAddr().toString();
  7. /* */ }
  8. /* 1173 */ return this.remoteAddr;
  9. /* */ }
  10. /* */

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

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

  1. /**
  2. * Return the remote IP address making this Request.
  3. */
  4. @Override
  5. public String getRemoteAddr() {
  6. if (remoteAddr == null) {
  7. coyoteRequest.action
  8. (ActionCode.REQ_HOST_ADDR_ATTRIBUTE, coyoteRequest);
  9. remoteAddr = coyoteRequest.remoteAddr().toString();
  10. }
  11. return remoteAddr;
  12. }

代码示例来源:origin: jboss.web/jbossweb

  1. public String getRemoteAddr() {
  2. req.action(ActionCode.ACTION_REQ_HOST_ADDR_ATTRIBUTE, null);
  3. return req.remoteAddr().toString();
  4. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. @Override
  2. protected final void populateRequestAttributeRemoteHost() {
  3. // Get remote host name using a DNS resolution
  4. if (request.remoteHost().isNull()) {
  5. try {
  6. request.remoteHost().setString(InetAddress.getByName
  7. (request.remoteAddr().toString()).getHostName());
  8. } catch (IOException iex) {
  9. // Ignore
  10. }
  11. }
  12. }

相关文章

Request类方法