Connector connector)
throws MalformedObjectNameException {
ObjectName name = null;
if (connector instanceof HttpConnector) {
HttpConnector httpConnector = (HttpConnector) connector;
Service service = httpConnector.getService();
String serviceName = null;
if (service != null)
serviceName = service.getName();
name = new ObjectName(domain + ":type=Connector" +
",service=" + serviceName +
",port=" + httpConnector.getPort() +
",address=" + httpConnector.getAddress());
return (name);
} else if (connector instanceof org.apache.catalina.connector.http10.HttpConnector) {
org.apache.catalina.connector.http10.HttpConnector httpConnector =
(org.apache.catalina.connector.http10.HttpConnector) connector;
Service service = httpConnector.getService();
String serviceName = null;
if (service != null)
serviceName = service.getName();
name = new ObjectName(domain + ":type=Connector" +
",service=" + serviceName+
",port=" + httpConnector.getPort() +
",address=" + httpConnector.getAddress());
return (name);
} else if ("org.apache.ajp.tomcat4.Ajp13Connector".equals
(connector.getClass().getName())) {
try {
String address = (String)