org.apache.coyote.Adapter.getDomain()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(109)

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

Adapter.getDomain介绍

[英]Provide the name of the domain to use to register MBeans for conponents associated with the connector.
[中]

代码示例

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

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = adapter.getDomain();
  
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  name.append(getPort());
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.toString()));
  }
  return new ObjectName(name.toString());
}

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

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = adapter.getDomain();
  
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  int port = getPort();
  if (port > 0) {
    name.append(getPort());
  } else {
    name.append("auto-");
    name.append(getNameIndex());
  }
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.getHostAddress()));
  }
  return new ObjectName(name.toString());
}

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

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = adapter.getDomain();
  
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  int port = getPort();
  if (port > 0) {
    name.append(getPort());
  } else {
    name.append("auto-");
    name.append(getNameIndex());
  }
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.getHostAddress()));
  }
  return new ObjectName(name.toString());
}

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

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = getAdapter().getDomain();
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  int port = getPort();
  if (port > 0) {
    name.append(getPort());
  } else {
    name.append("auto-");
    name.append(getNameIndex());
  }
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.getHostAddress()));
  }
  return new ObjectName(name.toString());
}

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

private ObjectName createObjectName() throws MalformedObjectNameException {
  // Use the same domain as the connector
  domain = getAdapter().getDomain();
  if (domain == null) {
    return null;
  }
  StringBuilder name = new StringBuilder(getDomain());
  name.append(":type=ProtocolHandler,port=");
  int port = getPort();
  if (port > 0) {
    name.append(getPort());
  } else {
    name.append("auto-");
    name.append(getNameIndex());
  }
  InetAddress address = getAddress();
  if (address != null) {
    name.append(",address=");
    name.append(ObjectName.quote(address.getHostAddress()));
  }
  return new ObjectName(name.toString());
}

相关文章