MCPcopy Create free account
hub / github.com/apache/tomcat / setConnector

Method setConnector

java/org/apache/catalina/startup/Tomcat.java:527–539  ·  view source on GitHub ↗

Set the specified connector in the service, if it is not already present. @param connector The connector instance to add

(Connector connector)

Source from the content-addressed store, hash-verified

525 * @param connector The connector instance to add
526 */
527 public void setConnector(Connector connector) {
528 Service service = getService();
529 boolean found = false;
530 for (Connector serviceConnector : service.findConnectors()) {
531 if (connector == serviceConnector) {
532 found = true;
533 break;
534 }
535 }
536 if (!found) {
537 service.addConnector(connector);
538 }
539 }
540
541 /**
542 * Get the service object. Can be used to add more connectors and few other global settings.

Callers 1

testConnectorsMethod · 0.95

Calls 3

getServiceMethod · 0.95
findConnectorsMethod · 0.95
addConnectorMethod · 0.95

Tested by 1

testConnectorsMethod · 0.76