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

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

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

Request.setServerPort介绍

暂无

代码示例

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

try {
  final int port = Integer.parseInt(hostHeader.substring(colonPos + 1));
  coyoteReq.setServerPort(port);
} catch (NumberFormatException e) {

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/*      */   public void setServerPort(int port)
/*      */   {
/*  862 */     this.coyoteRequest.setServerPort(port);
/*      */   }
/*      */

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * Set the port number of the server to process this request.
 *
 * @param port The server port
 */
public void setServerPort(int port) {
  coyoteRequest.setServerPort(port);
}

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

/**
 * {@inheritDoc}
 * <p>
 * This implementation provides the server name from the default host and
 * the server port from the local port.
 */
@Override
protected void populateHost() {
  // No host information (HTTP/1.0)
  // Ensure the local port field is populated before using it.
  request.action(ActionCode.REQ_LOCALPORT_ATTRIBUTE, request);
  request.setServerPort(request.getLocalPort());
  // request.serverName() will be set to the default host name by the
  // mapper
}

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

request.setServerPort(socket.getLocalPort());
InetAddress localAddress = socket.getLocalAddress();
if (sslSupport == null) {
  request.setServerPort(80);
} else {
  request.setServerPort(443);
  mult = 10 * mult;
request.setServerPort(port);

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

/**
 * {@inheritDoc}
 * <p>
 * This implementation populates the server name and port from the local
 * name and port provided by the AJP message.
 */
@Override
protected void populateHost() {
  // No host information (HTTP/1.0)
  request.setServerPort(request.getLocalPort());
  try {
    request.serverName().duplicate(request.localName());
  } catch (IOException e) {
    response.setStatus(400);
    setErrorState(ErrorState.CLOSE_CLEAN, e);
  }
}

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

request.setServerPort(request.getLocalPort());
try {
  request.serverName().duplicate(request.localName());
if (request.scheme().equalsIgnoreCase("https")) {
  request.setServerPort(443);
} else {
  request.setServerPort(80);
  mult = 10 * mult;
request.setServerPort(port);

代码示例来源:origin: org.glassfish.metro/webservices-extra

request.setServerPort(selectorThread.getPort());

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

private void setHost(final Request request, final CharSequence host) throws IOException {
  CharChunk chunk;
  try {
    // slightly fancier logic..
    final URL newUrl = new URL(host.toString());
    final String protocol = newUrl.getProtocol();
    final int port = newUrl.getPort();
    final String newHost = newUrl.getHost();
    request.getCoyoteRequest().serverName().recycle();
    chunk = request.getCoyoteRequest().serverName().getCharChunk();
    chunk.recycle();
    chunk.append(newHost);
    request.getCoyoteRequest().serverName().toChars();
    request.getCoyoteRequest().setServerPort(port);
    request.getCoyoteRequest().scheme().recycle();
    chunk = request.getCoyoteRequest().scheme().getCharChunk();
    chunk.recycle();
    chunk.append(protocol);
    request.getCoyoteRequest().scheme().toChars();
  } catch (final MalformedURLException e) {
    // assume we just have the host name
    request.getCoyoteRequest().serverName().recycle();
    chunk = request.getCoyoteRequest().serverName().getCharChunk();
    chunk.recycle();
    chunk.append(host.toString());
    request.getCoyoteRequest().serverName().toChars();
  }
}

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

request.setServerPort(port);

相关文章

Request类方法