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

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

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

ObjectName.isPropertyPattern介绍

暂无

代码示例

代码示例来源:origin: org.jboss.jbossas/jboss-as-j2se

/**
 * Construct a new property pattern
 *
 * @param pattern the object name that might be a pattern
 */
public PropertyPattern(ObjectName pattern)
{
  isPropertyPattern = pattern.isPropertyPattern();
  if (isPropertyPattern)
  {
   Hashtable patternKPList = pattern.getKeyPropertyList();
   int length = patternKPList.size();
   propertyKeys = new Object[length];
   propertyValues = new Object[length];
   int i = 0;
   for (Iterator iterator = patternKPList.entrySet().iterator(); iterator.hasNext(); i++)
   {
     Map.Entry entry = (Map.Entry) iterator.next();
     propertyKeys[i] = entry.getKey();
     propertyValues[i] = entry.getValue();
   }
  }
  else
   canonicalKeyPropertyString = pattern.getCanonicalKeyPropertyListString();
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-j2se

/**
* Takes the properties from the given Object Name and convert
* special characters back
*
* @param pObjectName Given Object Name
*
* @return Hashtable with the back converted properties in it
*         and will contain a "*" as key if the given object
*         name is a property pattern for queries.
**/
public static Hashtable getProperties( ObjectName pObjectName )
{
 Hashtable lReturn = reverseProperties( pObjectName.getKeyPropertyList() );
 if( pObjectName.isPropertyPattern() ) {
   lReturn.put( "*", "*" );
 }
 return lReturn;
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-j2se

/**
* Takes the properties from the given Object Name and convert
* special characters back
*
* @param pObjectName Given Object Name
*
* @return String with the original Object Name String representation and
*         when a property pattern Object Name for queries it contains a ",*"
*         at the end.
**/
public static String getString( ObjectName pObjectName )
{
 String lReturn = pObjectName.getDomain() + ":" + reverseString( pObjectName.getKeyPropertyList() );
 if( pObjectName.isPropertyPattern() ) {
   lReturn = lReturn + ",*";
 }
 return lReturn;
}

代码示例来源:origin: apache/felix

if (name.isPropertyPattern())

代码示例来源:origin: apache/flex-blazeds

/**
 * Constructs a <code>ObjectName</code> instance based upon a
 * <code>javax.management.ObjectName</code> instance.
 * 
 * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
 */
public ObjectName(javax.management.ObjectName objectName)
{
  canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
  canonicalName = objectName.getCanonicalName();
  domain = objectName.getDomain();
  keyPropertyList = objectName.getKeyPropertyList();
  keyPropertyListString = objectName.getKeyPropertyListString();
  pattern = objectName.isPattern();        
  propertyPattern = objectName.isPropertyPattern();
}

代码示例来源:origin: org.apache.flex.blazeds/flex-messaging-core

/**
 * Constructs a <code>ObjectName</code> instance based upon a
 * <code>javax.management.ObjectName</code> instance.
 * 
 * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
 */
public ObjectName(javax.management.ObjectName objectName)
{
  canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
  canonicalName = objectName.getCanonicalName();
  domain = objectName.getDomain();
  keyPropertyList = objectName.getKeyPropertyList();
  keyPropertyListString = objectName.getKeyPropertyListString();
  pattern = objectName.isPattern();        
  propertyPattern = objectName.isPropertyPattern();
}

代码示例来源:origin: com.adobe.flex/com.springsource.flex.messaging

/**
 * Constructs a <code>ObjectName</code> instance based upon a
 * <code>javax.management.ObjectName</code> instance.
 * 
 * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
 */
public ObjectName(javax.management.ObjectName objectName)
{
  canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
  canonicalName = objectName.getCanonicalName();
  domain = objectName.getDomain();
  keyPropertyList = objectName.getKeyPropertyList();
  keyPropertyListString = objectName.getKeyPropertyListString();
  pattern = objectName.isPattern();        
  propertyPattern = objectName.isPropertyPattern();
}

代码示例来源:origin: org.glassfish.main.common/amx-core

public static ObjectName removeProperty(
    final ObjectName objectName,
    final String key)
{
  ObjectName nameWithoutKey = objectName;
  if (objectName.getKeyProperty(key) != null)
  {
    final String domain = objectName.getDomain();
    final Hashtable<String, String> props =
        TypeCast.asHashtable(objectName.getKeyPropertyList());
    props.remove(key);
    if (objectName.isPropertyPattern())
    {
      nameWithoutKey = newObjectNamePattern(domain,
          nameWithoutKey.getKeyPropertyListString());
    }
    else
    {
      try
      {
        nameWithoutKey = new ObjectName(domain, props);
      }
      catch (Exception e)
      {
        throw new RuntimeException(e);
      }
    }
  }
  return (nameWithoutKey);
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-j2se

if( n0.isPropertyPattern() )
else if( n1.isPropertyPattern() )

代码示例来源:origin: com.caucho/resin

return false;
if (queryName.isPropertyPattern()) {

代码示例来源:origin: org.glassfish.common/amx-core

if (objectName.isPropertyPattern())

代码示例来源:origin: apache/felix

if (pattern.isPropertyPattern())

代码示例来源:origin: org.objectweb.fractal.fractaljmx/fractal-jmx

private AgentMonitorMBean[] createStringMonitors(String str) throws MalformedObjectNameException {
  String[] strTab = split(str, ";");
  //System.out.println("- " + Arrays.asList(strTab));
  MyStringMonitor[] gauges = new MyStringMonitor[strTab.length];
  for (int i = 0; i < strTab.length; i++) {
    try {
      ObjectName oName = new ObjectName(strTab[i]);
      Hashtable h = oName.getKeyPropertyList();
      gauges[i] = new MyStringMonitor((i + 1));
      // set String monitor params
      gauges[i].setObservedAttribute((String) remove(h, "observedAttribute"));
      gauges[i].setGranularityPeriod(Long.parseLong((String) remove(h, "granularityPeriod")));
      gauges[i].setStringToCompare((String) remove(h, "stringToCompare"));
      gauges[i].setNotifyDiffer(Boolean.valueOf((String) remove(h, "notifyDiffer")).booleanValue());
      gauges[i].setNotifyMatch(Boolean.valueOf((String) remove(h, "notifyMatch")).booleanValue());
      if (oName.isPropertyPattern())
        gauges[i].setPattern(new ObjectName(oName.getDomain() + ":" + asString(h) + ",*"));
      else
        gauges[i].setPattern(new ObjectName(oName.getDomain(), h));
    } catch (Exception e) {
      throw new IllegalStateException(
        "String monitor \"" + strTab[i] + "\" is invalid. " + e.toString() + ". " + CONST.STRING_SYNTAX);
    }
  }
  return gauges;
}

代码示例来源:origin: org.objectweb.fractal.fractaljmx/fractal-jmx

counters[j].setOffset(Long.valueOf((String) remove(h, "offset")));
counters[j].setDifferenceMode(Boolean.valueOf((String) remove(h, "differenceMode")).booleanValue());
if (oName.isPropertyPattern())
  counters[j].setPattern(new ObjectName(oName.getDomain() + ":" + asString(h) + ",*"));
else

代码示例来源:origin: org.objectweb.fractal.fractaljmx/fractal-jmx

Double.valueOf((String) remove(h, "lowThreshold")));
gauges[j].setDifferenceMode(Boolean.valueOf((String) remove(h, "differenceMode")).booleanValue());
if (oName.isPropertyPattern())
  gauges[j].setPattern(new ObjectName(oName.getDomain() + ":" + asString(h) + ",*"));
else

相关文章