AbstractProtocol.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目: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=");
    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());
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号