本文整理了Java中org.apache.catalina.connector.Connector.setEnableLookups()
方法的一些代码示例,展示了Connector.setEnableLookups()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.setEnableLookups()
方法的具体详情如下:
包路径:org.apache.catalina.connector.Connector
类名称:Connector
方法名:setEnableLookups
[英]Set the "enable DNS lookups" flag.
[中]
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6
public void setEnableLookups(boolean enabled) {
connector.setEnableLookups(enabled);
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat
public void setHostLookupEnabled(boolean enabled) {
connector.setEnableLookups(enabled);
}
代码示例来源:origin: org.apache.airavata/airavata-embedded-tomcat
/**
* Get a Tomcat Connector. If a connector with the Tomcat connector does not exist, create a new
* one.
*
* @param protocol The protocol of the connector.
* @param address The IP address of the network interface to which this connector should bind
* to. Specify this as null if the connector should bind to all network interfaces.
* @param port The port on which this connector has to be run
* @return The Tomcat connector
*/
public Connector addConnector(Protocol protocol, String address, int port) {
Connector connector = connectors.get(protocol + "-" + address + "-" + port);
if (connector == null) {
connector = new Connector(protocol.getProtocolClass());
if (address != null) {
IntrospectionUtils.setProperty(connector, "address", address);
}
connector.setPort(port);
connector.setEnableLookups(true);
connector.setProperty("bindOnInit", "false");
if (protocol.equals(Protocol.HTTPS_11) || protocol.equals(Protocol.HTTPS_11_NIO)) {
connector.setSecure(true);
connector.setAttribute("SSLEnabled", "true");
connector.setScheme("https");
}
tomcat.getService().addConnector(connector);
}
return connector;
}
内容来源于网络,如有侵权,请联系作者删除!