本文整理了Java中org.apache.catalina.connector.Request.getLocalPort
方法的一些代码示例,展示了Request.getLocalPort
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getLocalPort
方法的具体详情如下:
包路径:org.apache.catalina.connector.Request
类名称:Request
方法名:getLocalPort
[英]Returns the Internet Protocol (IP) port number of the interface on which the request was received.
[中]返回接收请求的接口的Internet协议(IP)端口号。
代码示例来源:origin: org.glassfish.main.web/web-core
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(rb.getString(LogFacade.CANNOT_USE_REQUEST_OBJECT_OUTSIDE_SCOPE_EXCEPTION));
}
return request.getLocalPort();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: tomcat/catalina
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: jboss.web/jbossweb
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: org.jboss.web/jbossweb
public int getLocalPort() {
if (request == null) {
throw MESSAGES.nullRequestFacade();
}
return request.getLocalPort();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public int getLocalPort() {
if (request == null) {
throw new IllegalStateException(
sm.getString("requestFacade.nullRequest"));
}
return request.getLocalPort();
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
public java.net.URI getURI() {
if (uri == null) {
try {
String uriString = request.getScheme() + "://" + request.getServerName() + ":" + request.getLocalPort() + request.getRequestURI();
//return new java.net.URI(uri.getScheme(),uri.getHost(),uri.getPath(),uri.);
uri = new java.net.URI(uriString);
} catch (URISyntaxException e) {
throw new IllegalStateException(e.getMessage());
}
}
return uri;
}
代码示例来源:origin: apache/ofbiz-framework
public @Override void invoke(Request req, Response resp) throws IOException, ServletException {
if (sslAcceleratorPort != null && req.getLocalPort() == sslAcceleratorPort.intValue()) {
req.setSecure(true);
}
if (getNext() != null) {
getNext().invoke(req, resp);
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
return request.getLocalAddr();
} else if (key.equals("SERVER_PORT")) {
return String.valueOf(request.getLocalPort());
} else if (key.equals("SERVER_PROTOCOL")) {
return request.getProtocol();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
return request.getLocalAddr();
} else if (key.equals("SERVER_PORT")) {
return String.valueOf(request.getLocalPort());
} else if (key.equals("SERVER_PROTOCOL")) {
return request.getProtocol();
代码示例来源:origin: org.jboss.web/jbossweb
return request.getLocalAddr();
} else if (key.equals("SERVER_PORT")) {
return String.valueOf(request.getLocalPort());
} else if (key.equals("SERVER_PROTOCOL")) {
return request.getProtocol();
代码示例来源:origin: codefollower/Tomcat-Research
return request.getLocalAddr();
} else if (key.equals("SERVER_PORT")) {
return String.valueOf(request.getLocalPort());
} else if (key.equals("SERVER_PROTOCOL")) {
return request.getProtocol();
代码示例来源:origin: jboss.web/jbossweb
return request.getLocalAddr();
} else if (key.equals("SERVER_PORT")) {
return String.valueOf(request.getLocalPort());
} else if (key.equals("SERVER_PROTOCOL")) {
return request.getProtocol();
代码示例来源:origin: com.springsource.insight/insight-collection-tcserver
void fillInRequestDetails(OperationMap op, Request request) {
op.put("method", request.getMethod())
.put(OperationFields.CONTEXT_AVAILABLE, request.getContext().getAvailable())
.put("protocol", request.getProtocol())
.put(OperationFields.URI, request.getRequestURI())
.put("queryString", request.getQueryString())
.put("locale", request.getLocale().toString())
.put("remoteAddr", request.getRemoteAddr())
.put("localAddr", request.getLocalAddr())
.put("localPort", request.getLocalPort())
.put("sessionId", request.getRequestedSessionId())
.put("userPrincipal", request.getUserPrincipal() != null ? request.getUserPrincipal().getName() : null)
.put("contextPath", request.getContextPath())
.put("servletName", parseServletName(request));
fillInHeaders(op.createList("headers"), request);
fillInQueryParams(op.createList("queryParams"), request);
}
内容来源于网络,如有侵权,请联系作者删除!