本文整理了Java中org.apache.catalina.connector.Connector.setProxyPort()
方法的一些代码示例,展示了Connector.setProxyPort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.setProxyPort()
方法的具体详情如下:
包路径:org.apache.catalina.connector.Connector
类名称:Connector
方法名:setProxyPort
[英]Set the proxy server port for this Connector.
[中]设置此连接器的代理服务器端口。
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
public void setProxyPort(int port) {
connector.setProxyPort(port);
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
@Persistent(manageable=false)
public void setProxyPort(int port) {
connector.setProxyPort(port);
}
代码示例来源:origin: zalando-stups/booties
@Override
public void customize(final Connector connector) {
if (!proxyConnectorCustomizerProperties.isEnabled()) {
logger.warn("CUSTOMIZE CONNECTORS IS DISABLED");
return;
}
for (ConnectorCustomizer cc : proxyConnectorCustomizerProperties.getCustomizers()) {
if (cc.isEnabled()) {
if (connector.getPort() == cc.getPort()) {
logger.warn("CUSTOMIZE CONNECTOR ON PORT : {}", connector.getPort());
logger.warn("SET CONNECTOR - 'secure' : {}", cc.isSecure());
connector.setSecure(cc.isSecure());
logger.warn("SET CONNECTOR - 'scheme' : {}", cc.getScheme());
connector.setScheme(cc.getScheme());
logger.warn("SET CONNECTOR - 'proxy-port' : {}", cc.getProxyPort());
connector.setProxyPort(cc.getProxyPort());
logger.warn("SET CONNECTOR - 'proxy-name' : {}", cc.getProxyName());
connector.setProxyName(cc.getProxyName());
} else {
logger.info("No customizer found for connector on port : {}", connector.getPort());
}
}
}
}
代码示例来源:origin: jsimone/webapp-runner
nioConnector.setProxyPort(uri.getPort());
} else if (scheme.equals("http")) {
nioConnector.setProxyPort(80);
} else if (scheme.equals("https")) {
nioConnector.setProxyPort(443);
代码示例来源:origin: com.github.jsimone/webapp-runner-main
nioConnector.setProxyPort(uri.getPort());
} else if (scheme.equals("http")) {
nioConnector.setProxyPort(80);
} else if (scheme.equals("https")) {
nioConnector.setProxyPort(443);
代码示例来源:origin: org.dbflute.tomcat/tomcat-boot
public void setupServerConfigIfNeeds(BootLogger logger, Tomcat server, Connector connector, Properties props,
List<String> readConfigList) {
if (props == null) {
return;
}
logger.info("...Reflecting configuration to server: config=" + readConfigList);
doSetupServerConfig(logger, props, "URIEncoding", value -> connector.setURIEncoding(value));
doSetupServerConfig(logger, props, "useBodyEncodingForURI", value -> {
connector.setUseBodyEncodingForURI(isStringBooleanTrue(value));
});
doSetupServerConfig(logger, props, "secure", value -> connector.setSecure(isStringBooleanTrue(value)));
doSetupServerConfig(logger, props, "scheme", value -> connector.setScheme(value));
doSetupServerConfig(logger, props, "bindAddress", value -> connector.setProperty("address", value));
doSetupServerConfig(logger, props, "proxyPort", value -> connector.setProxyPort(toInt("proxyPort(config)", value)));
doSetupServerConfig(logger, props, "maxHttpHeaderSize", value -> {
reflectPropertyMaxHttpHeaderSize(logger, server, connector, value);
});
}
内容来源于网络,如有侵权,请联系作者删除!