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)
| 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 | /** |
nothing calls this directly
no test coverage detected