Package org.hyperic.hq.product

Examples of org.hyperic.hq.product.PluginException


    try {
      targetDomainPattern = new ObjectName(getMandatoryProperty(this,
          TalendHqConstants.PROP_TARGET_DOMAIN) + ":*");
    } catch (MalformedObjectNameException e) {
      throw new PluginException(e);
    }

    try {
      String objName = getOptionalProperty(this,
          TalendHqConstants.PROP_ABSENT_DOMAIN);
      if (objName != null) {
        absentDomainPattern = new ObjectName(objName + ":*");
      }
    } catch (MalformedObjectNameException e) {
      throw new PluginException(e);
    }
  }
View Full Code Here


        } else {
          logInfoOnlyFirstInstance(firstInstance,
              "Cache periodical cleanup is switched off.");
        }
      } catch (NumberFormatException e) {
        throw new PluginException(
            "Cannot read cache gc interval value.", e);
      }
    }
  }
View Full Code Here

    } catch (IOException e) {
      log.debug(MSG_ERR_CONNECT, e);
      throw new MetricUnreachableException(MSG_ERR_CONNECT, e);
    } catch (Exception e) {
      log.debug(MSG_ERR_UNEXPECTED, e);
      throw new PluginException(MSG_ERR_UNEXPECTED, e);
    } finally {
      // it's null-proof
      MxUtil.close(jmxConnector);
    }
View Full Code Here

  public static String getMandatoryProperty(final GenericPlugin plugin,
      final String propName) throws PluginException {
    final String result = plugin.getTypeProperty(plugin.getTypeInfo(), propName);
    if (result == null) {
      throw new PluginException("Mandatory property '" + propName + "' is not set.");
    }
    return result;
  }
View Full Code Here

        return new MetricValue(n);
      }
    } catch (IOException e) {
      throw new MetricUnreachableException("Error during communication with remote MBean Server.", e);
    } catch (Exception e) {
      throw new PluginException(e);
    }
   
    throw new MetricInvalidException("Cannot parse value of metric " + metric.toString());
  }
View Full Code Here

    super.init(manager);

    try {
      expirationTimeout = Long.valueOf(getMandatoryProperty(this, EXPIRATION_TIMEOUT));
    } catch (NumberFormatException e) {
      throw new PluginException(e);
    }
   
    try {
      objnameBundles = ObjectName.getInstance(getMandatoryProperty(this,
          PROP_BUNDLES_OBJNAME));
    } catch (PluginException e) {
      throw e;
    } catch (Exception e) {
      throw new PluginException(e);
    }

    try {
      objnameFeatures = ObjectName.getInstance(getMandatoryProperty(this,
          PROP_FEATURES_OBJNAME));
    } catch (PluginException e) {
      throw e;
    } catch (Exception e) {
      throw new PluginException(e);
    }

    try {
      objnameServices = ObjectName.getInstance(getMandatoryProperty(this,
          PROP_SERVICES_OBJNAME));
    } catch (PluginException e) {
      throw e;
    } catch (Exception e) {
      throw new PluginException(e);
    }
  }
View Full Code Here

      updateFeaturesData(conn);
      updateServicesData(conn);
    } catch (IOException e) {
      throw new MetricUnreachableException("Error during communication with remote MBean Server.", e);
    } catch (Exception e) {
      throw new PluginException("", e);
    } finally {
      // it's null-proof
      MxUtil.close(jmxConnector);
    }
View Full Code Here

    }

    updateCache(metric.getProperties());

    if (!dataCache.containsKey(metric.getAttributeName())) {
       throw new PluginException("Unknown metric " + metric.toString());
    }

    return dataCache.get(metric.getAttributeName());
  }
View Full Code Here

TOP

Related Classes of org.hyperic.hq.product.PluginException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.