javax.management.AttributeNotFoundException.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(131)

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

AttributeNotFoundException.<init>介绍

暂无

代码示例

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

@Override
public Object getAttribute(String arg0) throws AttributeNotFoundException,
    MBeanException, ReflectionException {
 synchronized(metricsMap) {
  if (metricsMap.containsKey(arg0)) {
   return metricsMap.get(arg0);
  } else {
   throw new AttributeNotFoundException("Key [" + arg0 + "] not found/tracked");
  }
 }
}

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

@Override
public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException {
  if (this.metrics.containsKey(name))
    return this.metrics.get(name).metricValue();
  else
    throw new AttributeNotFoundException("Could not find attribute " + name);
}

代码示例来源:origin: btraceio/btrace

@Override
public synchronized Object getAttribute(String name)
    throws AttributeNotFoundException {
  Field field = attributes.get(name);
  if (field == null) {
    throw new AttributeNotFoundException("No such property: " + name);
  }
  return getFieldValue(field);
}

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Cannot find " + attributeName +
         " attribute in " + dClassName));

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Cannot find " + attributeName +
         " attribute in " + dClassName));

代码示例来源:origin: org.apache.hadoop/hadoop-common

@Override
public Object getAttribute(String attribute)
  throws AttributeNotFoundException, MBeanException, ReflectionException {
 updateJmxCache();
 synchronized(this) {
  Attribute a = attrCache.get(attribute);
  if (a == null) {
   throw new AttributeNotFoundException(attribute +" not found");
  }
  if (LOG.isDebugEnabled()) {
   LOG.debug(attribute +": "+ a);
  }
  return a.getValue();
 }
}

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Cannot find " + attributeName +
         " attribute in " + dClassName));

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Attribute " + name +
         " not found in " +
         this.getClass().getName()));

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Attribute " + name +
         " not found in " +
         this.getClass().getName()));

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Attribute " + name +
         " not found in " +
         this.getClass().getName()));

代码示例来源:origin: log4j/log4j

throw(new AttributeNotFoundException("Cannot find " + attributeName +
         " attribute in " + dClassName));

代码示例来源:origin: org.springframework.boot/spring-boot-actuator

@Override
public Object getAttribute(String attribute)
    throws AttributeNotFoundException, MBeanException, ReflectionException {
  throw new AttributeNotFoundException("EndpointMBeans do not support attributes");
}

代码示例来源:origin: org.springframework.boot/spring-boot-actuator

@Override
public void setAttribute(Attribute attribute) throws AttributeNotFoundException,
    InvalidAttributeValueException, MBeanException, ReflectionException {
  throw new AttributeNotFoundException("EndpointMBeans do not support attributes");
}

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

throw new AttributeNotFoundException(
   "ModelMBeanInfo is null");
if (logger.isEnabledFor(Logger.DEBUG))
 throw new AttributeNotFoundException(
   String.format("Cannot find ModelMBeanAttributeInfo for attribute %s",
     attrName));
 throw new AttributeNotFoundException(
   String.format("Attribute %s is not writable", attrName));
 throw new AttributeNotFoundException(
   "MBean descriptor cannot be null");
if (logger.isEnabledFor(Logger.DEBUG))
 throw new AttributeNotFoundException(
   String.format("Attribute descriptor for attribute %s cannot be null",
     attrName));

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

throw new AttributeNotFoundException(
   "ModelMBeanInfo is null");
if (logger.isEnabledFor(Logger.DEBUG))
 throw new AttributeNotFoundException(
   String.format("Cannot find ModelMBeanAttributeInfo for attribute %s",
     attribute));
 logger.debug("Attribute info is: " + attrInfo);
if (!attrInfo.isReadable())
 throw new AttributeNotFoundException(
   String.format("Attribute %s is not readable", attribute));
 throw new AttributeNotFoundException(
   "MBean descriptor cannot be null");
if (logger.isEnabledFor(Logger.DEBUG))
 throw new AttributeNotFoundException(
   String.format("Attribute descriptor for attribute %s cannot be null",
     attribute));

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

@Override
public synchronized Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException {
  if (_propMap != null) {
    return _propMap.get(name);
  }
  throw new AttributeNotFoundException("No such property " + name);
}

代码示例来源:origin: rhuss/jolokia

private void checkPathFitsIndexNames(Stack<String> pPathStack, List<String> pIndexNames) throws AttributeNotFoundException {
  if (pIndexNames.size() > pPathStack.size()) {
    StringBuilder buf = new StringBuilder();
    for (int i = 0; i < pIndexNames.size(); i++) {
      buf.append(pIndexNames.get(i));
      if (i < pIndexNames.size() - 1) {
        buf.append(",");
      }
    }
    throw new AttributeNotFoundException("No enough keys on path stack provided for accessing tabular data with index names "
                       + buf.toString());
  }
}

代码示例来源:origin: rhuss/jolokia

private Object extractWithPath(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts, boolean jsonify, String pPath, ValueFaultHandler pFaultHandler) throws AttributeNotFoundException {
  AttributeExtractor<T> extractor = extractorMap.get(pPath);
  if (extractor == null) {
    return pFaultHandler.handleException(new AttributeNotFoundException("Illegal path element " + pPath + " for object " + pValue));
  }
  try {
    Object attributeValue = extractor.extract((T) pValue);
    return pConverter.extractObject(attributeValue, pPathParts, jsonify);
  } catch (AttributeExtractor.SkipAttributeException e) {
    return pFaultHandler.handleException(new AttributeNotFoundException("Illegal path element " + pPath + " for object " + pValue));
  }
}

代码示例来源:origin: rhuss/jolokia

private Object extractWithPath(ObjectToJsonConverter pConverter, List pList, Stack<String> pStack, boolean jsonify, String pPathPart) throws AttributeNotFoundException {
  try {
    int idx = Integer.parseInt(pPathPart);
    return pConverter.extractObject(pList.get(idx), pStack, jsonify);
  } catch (NumberFormatException exp) {
    ValueFaultHandler faultHandler = pConverter.getValueFaultHandler();
    return faultHandler.handleException(
        new AttributeNotFoundException("Index '" + pPathPart +  "' is not numeric for accessing list"));
  } catch (IndexOutOfBoundsException exp) {
    ValueFaultHandler faultHandler = pConverter.getValueFaultHandler();
    return faultHandler.handleException(
        new AttributeNotFoundException("Index '" + pPathPart +  "' is out-of-bound for a list of size " + pList.size()));
  }
}

代码示例来源:origin: rhuss/jolokia

private Object extractWithPath(ObjectToJsonConverter pConverter, Collection pCollection, Stack<String> pPathParts, boolean pJsonify, String pPathPart,int pLength) throws AttributeNotFoundException {
  try {
    int idx = Integer.parseInt(pPathPart);
    return pConverter.extractObject(getElement(pCollection,idx,pLength), pPathParts, pJsonify);
  } catch (NumberFormatException exp) {
    ValueFaultHandler faultHandler = pConverter.getValueFaultHandler();
    return faultHandler.handleException(
        new AttributeNotFoundException("Index '" + pPathPart +  "' is not numeric for accessing list"));
  } catch (IndexOutOfBoundsException exp) {
    ValueFaultHandler faultHandler = pConverter.getValueFaultHandler();
    return faultHandler.handleException(
        new AttributeNotFoundException("Index '" + pPathPart +  "' is out-of-bound for a list of size " + pLength));
  }
}

相关文章