javax.management.ObjectName.isPropertyListPattern()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(84)

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

ObjectName.isPropertyListPattern介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly-core

ObjectNameMatchResourceAction(ObjectName baseName) {
  this.baseName = baseName;
  this.properties = baseName == null ? Collections.<String, String>emptyMap() : baseName.getKeyPropertyList();
  try {
    this.domainOnlyName = baseName == null ? null : ObjectName.getInstance(baseName.getDomain() + ":*");
  } catch (MalformedObjectNameException e) {
    throw new IllegalStateException(e);
  }
  this.propertyListPattern = baseName != null && baseName.isPropertyListPattern();
}

代码示例来源:origin: com.github.veithen.visualwas/connector

ObjectName localToRemote(ObjectName localName) throws IOException {
  if (nonRoutableDomains.contains(localName.getDomain()) || nonRoutableMBeans.contains(localName)) {
    return localName;
  } else {
    synchronized (localToRemoteCache) {
      ObjectName remoteName = localToRemoteCache.get(localName);
      if (remoteName == null) {
        Hashtable<String,String> newProps = new Hashtable<>(localName.getKeyPropertyList());
        newProps.put("cell", cell);
        newProps.put("node", node);
        newProps.put("process", process);
        try {
          remoteName = new ObjectName(localName.getDomain(), newProps);
          if (localName.isPropertyListPattern()) {
            remoteName = new ObjectName(remoteName + ",*");
          }
        } catch (MalformedObjectNameException ex) {
          // It's unlikely that we ever get here
          throw new Error(ex);
        }
        localToRemoteCache.put(localName, remoteName);
      }
      return remoteName;
    }
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-jsr77

private Set<Handler> getHandlers(final ObjectName name){
  if (name == null) {
    return getHandlersForName(IllAcceptAnythingNameMatcher.INSTANCE);
  }
  if (!isMyDomain(name)) {
    return Collections.emptySet();
  }
  String property = name.getKeyProperty(Handler.J2EE_TYPE);
  if (property != null) {
    if (property.contains("*")) {
      return getHandlersForName(new WildcardPatternNameMatcher(Pattern.compile(property.replace("*", ".*"))));
    }
    return getHandlersForName(new ExactNameMatcher(property));
  }
  if (name.isPropertyListPattern()) {
    return getHandlersForName(IllAcceptAnythingNameMatcher.INSTANCE);
  }
  return Collections.emptySet();
}

相关文章