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

Method addConnector

java/org/apache/catalina/mbeans/ServiceMBean.java:47–60  ·  view source on GitHub ↗

Add a new Connector to the set of defined Connectors, and associate it with this Service's Container. @param address The IP address on which to bind @param port TCP port number to listen on @param isAjp Create a AJP/1.3 Connector @param isSSL Create a secure Connector @throws MBeanException

(String address, int port, boolean isAjp, boolean isSSL)

Source from the content-addressed store, hash-verified

45 * @throws MBeanException error creating the connector
46 */
47 public void addConnector(String address, int port, boolean isAjp, boolean isSSL) throws MBeanException {
48
49 Service service = doGetManagedResource();
50 String protocol = isAjp ? "AJP/1.3" : "HTTP/1.1";
51 Connector connector = new Connector(protocol);
52 if ((address != null) && (!address.isEmpty())) {
53 connector.setProperty("address", address);
54 }
55 connector.setPort(port);
56 connector.setSecure(isSSL);
57 connector.setScheme(isSSL ? "https" : "http");
58
59 service.addConnector(connector);
60 }
61
62
63 /**

Callers

nothing calls this directly

Calls 7

setPropertyMethod · 0.95
setPortMethod · 0.95
setSecureMethod · 0.95
setSchemeMethod · 0.95
addConnectorMethod · 0.95
doGetManagedResourceMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected