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());
}
AbstractProtocol.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:lazycat
作者:
评论列表
文章目录