org.apache.catalina.connector.Connector.toString()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(10.4k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.apache.catalina.connector.Connector.toString()方法的一些代码示例,展示了Connector.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.toString()方法的具体详情如下:
包路径:org.apache.catalina.connector.Connector
类名称:Connector
方法名:toString

Connector.toString介绍

[英]Provide a useful toString() implementation as it may be used when logging Lifecycle errors to identify the component.
[中]

代码示例

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public String getConnectorName() {
  return this.connector.toString();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

public String getConnectorName() {
  return this.connector.toString();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public String getConnectorName() {
  return this.connector.toString();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

@Deprecated
public String getConnectorName() {
  return this.connector.toString();
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

@Deprecated
public String getConnectorName() {
  return this.connector.toString();
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

protected Map<String,List<String>> getConnectorCiphers() {
  Map<String,List<String>> result = new HashMap<>();
  Connector connectors[] = getConnectors();
  for (Connector connector : connectors) {
    if (Boolean.TRUE.equals(connector.getProperty("SSLEnabled"))) {
      SSLHostConfig[] sslHostConfigs = connector.getProtocolHandler().findSslHostConfigs();
      for (SSLHostConfig sslHostConfig : sslHostConfigs) {
        String name = connector.toString() + "-" + sslHostConfig.getHostName();
        /* Add cipher list, keep order but remove duplicates */
        result.put(name, new ArrayList<>(new LinkedHashSet<>(
          Arrays.asList(sslHostConfig.getEnabledCiphers()))));
      }
    } else {
      ArrayList<String> cipherList = new ArrayList<>(1);
      cipherList.add(sm.getString("managerServlet.notSslConnector"));
      result.put(connector.toString(), cipherList);
    }
  }
  return result;
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Find and return the set of Connectors associated with this Service.
 * @return an array of string representations of the connectors
 * @throws MBeanException error accessing the associated service
 */
public String[] findConnectors() throws MBeanException {
  Service service = doGetManagedResource();
  Connector[] connectors = service.findConnectors();
  String[] str = new String[connectors.length];
  for(int i = 0; i < connectors.length; i++) {
    str[i] = connectors[i].toString();
  }
  return str;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Find and return the set of Connectors associated with this Service.
 * @return an array of string representations of the connectors
 * @throws MBeanException error accessing the associated service
 */
public String[] findConnectors() throws MBeanException {
  Service service = doGetManagedResource();
  Connector[] connectors = service.findConnectors();
  String[] str = new String[connectors.length];
  for(int i = 0; i < connectors.length; i++) {
    str[i] = connectors[i].toString();
  }
  return str;
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

protected Map<String,List<String>> getConnectorCiphers() {
  Map<String,List<String>> result = new HashMap<>();
  Connector connectors[] = getConnectors();
  for (Connector connector : connectors) {
    if (Boolean.TRUE.equals(connector.getProperty("SSLEnabled"))) {
      SSLHostConfig[] sslHostConfigs = connector.getProtocolHandler().findSslHostConfigs();
      for (SSLHostConfig sslHostConfig : sslHostConfigs) {
        String name = connector.toString() + "-" + sslHostConfig.getHostName();
        /* Add cipher list, keep order but remove duplicates */
        result.put(name, new ArrayList<>(new LinkedHashSet<>(
          Arrays.asList(sslHostConfig.getEnabledCiphers()))));
      }
    } else {
      ArrayList<String> cipherList = new ArrayList<>(1);
      cipherList.add(sm.getString("managerServlet.notSslConnector"));
      result.put(connector.toString(), cipherList);
    }
  }
  return result;
}

代码示例来源:origin: codefollower/Tomcat-Research

protected Map<String,Set<String>> getConnectorCiphers() {
    Map<String,Set<String>> result = new HashMap<>();

    Engine e = (Engine) host.getParent();
    Service s = e.getService();
    Connector connectors[] = s.findConnectors();
    for (Connector connector : connectors) {
      Set<String> cipherList = new HashSet<>();
      if (Boolean.TRUE.equals(connector.getProperty("SSLEnabled"))) {
        String[] ciphersUsed =
            (String[]) connector.getProperty("ciphersUsed");
        for (String cipherUsed : ciphersUsed) {
          cipherList.add(cipherUsed);
        }
      } else {
        cipherList.add(sm.getString("managerServlet.notSslConnector"));
      }
      result.put(connector.toString(), cipherList);
    }
    return result;
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

SSLHostConfig[] sslHostConfigs = connector.getProtocolHandler().findSslHostConfigs();
for (SSLHostConfig sslHostConfig : sslHostConfigs) {
  String name = connector.toString() + "-" + sslHostConfig.getHostName();
  List<String> certList = new ArrayList<>();
  SSLContext sslContext =
List<String> certList = new ArrayList<>(1);
certList.add(sm.getString("managerServlet.notSslConnector"));
result.put(connector.toString(), certList);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

SSLHostConfig[] sslHostConfigs = connector.getProtocolHandler().findSslHostConfigs();
for (SSLHostConfig sslHostConfig : sslHostConfigs) {
  String name = connector.toString() + "-" + sslHostConfig.getHostName();
  List<String> certList = new ArrayList<>();
  if (sslHostConfig.getOpenSslContext().longValue() == 0) {
List<String> certList = new ArrayList<>(1);
certList.add(sm.getString("managerServlet.notSslConnector"));
result.put(connector.toString(), certList);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

sslHostConfig.getCertificates();
    for (SSLHostConfigCertificate sslHostConfigCert : sslHostConfigCerts) {
      String name = connector.toString() + "-" + sslHostConfig.getHostName() +
          "-" + sslHostConfigCert.getType();
      List<String> certList = new ArrayList<>();
    List<String> certList = new ArrayList<>();
    certList.add(sm.getString("managerServlet.certsNotAvailable"));
    String name = connector.toString() + "-" + sslHostConfig.getHostName();
    result.put(name, certList);
List<String> certList = new ArrayList<>(1);
certList.add(sm.getString("managerServlet.notSslConnector"));
result.put(connector.toString(), certList);

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

sslHostConfig.getCertificates();
  for (SSLHostConfigCertificate sslHostConfigCert : sslHostConfigCerts) {
    String name = connector.toString() + "-" + sslHostConfig.getHostName() +
        "-" + sslHostConfigCert.getType();
    List<String> certList = new ArrayList<>();
List<String> certList = new ArrayList<>(1);
certList.add(sm.getString("managerServlet.notSslConnector"));
result.put(connector.toString(), certList);

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException 
 */
public String[] findConnectors() throws MBeanException {
  
  Service service; 
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  
  Connector[] connectors = service.findConnectors(); 
  String[] str = new String[connectors.length];
  
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  
  return str;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException 
 */
public String[] findConnectors() throws MBeanException {
  
  Service service; 
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  
  Connector[] connectors = service.findConnectors(); 
  String[] str = new String[connectors.length];
  
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  
  return str;
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException
 */
public String[] findConnectors() throws MBeanException {
  Service service;
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  Connector[] connectors = service.findConnectors();
  String[] str = new String[connectors.length];
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  return str;
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException 
 */
public String[] findConnectors() throws MBeanException {
  
  Service service; 
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  
  Connector[] connectors = service.findConnectors(); 
  String[] str = new String[connectors.length];
  
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  
  return str;
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException 
 */
public String[] findConnectors() throws MBeanException {
  
  Service service; 
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  
  Connector[] connectors = service.findConnectors(); 
  String[] str = new String[connectors.length];
  
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  
  return str;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Find and return the set of Connectors associated with this Service.
 * @throws MBeanException 
 */
public String[] findConnectors() throws MBeanException {
  
  Service service; 
  try {
    service = (Service)getManagedResource();
  } catch (InstanceNotFoundException e) {
    throw new MBeanException(e);
  } catch (RuntimeOperationsException e) {
    throw new MBeanException(e);
  } catch (InvalidTargetObjectTypeException e) {
    throw new MBeanException(e);
  }
  
  Connector[] connectors = service.findConnectors(); 
  String[] str = new String[connectors.length];
  
  for(int i=0; i< connectors.length; i++){
    str[i] = connectors[i].toString();
  }
  
  return str;
}

相关文章

Connector类方法