protected static void loadAllPlugins(final ThresHolder thresholds) { for (Class<?> stat : new PluginManager<LocusMetric>(LocusMetric.class).getPlugins()) { try { final LocusMetric stats = (LocusMetric) stat.newInstance(); stats.initialize(thresholds); thresholds.locusMetricList.add(stats); } catch (Exception e) { throw new DynamicClassResolutionException(stat, e); } } for (Class<?> stat : new PluginManager<SampleMetric>(SampleMetric.class).getPlugins()) { try { final SampleMetric stats = (SampleMetric) stat.newInstance(); stats.initialize(thresholds); thresholds.sampleMetricList.add(stats); } catch (Exception e) { throw new DynamicClassResolutionException(stat, e); } } for (Class<?> stat : new PluginManager<IntervalMetric>(IntervalMetric.class).getPlugins()) { try { final IntervalMetric stats = (IntervalMetric) stat.newInstance(); stats.initialize(thresholds); thresholds.intervalMetricList.add(stats); } catch (Exception e) { throw new DynamicClassResolutionException(stat, e); } } }
/** * Returns the current value of the outputQueueLength property This will be <code>null</code> if * the metric aggregate values have been specified */ public Double getOutputQueueLength() { if (_outputQueueLength == null) { return null; } return _outputQueueLength.getValue(); }
/** * Returns the current value of the outboundErrors property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getOutboundErrors() { if (_outboundErrors == null) { return null; } return _outboundErrors.getValue(); }
/** * Returns the current value of the inboundErrors property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getInboundErrors() { if (_inboundErrors == null) { return null; } return _inboundErrors.getValue(); }
/** * Returns the current value of the outboundPacketsDropped property This will be <code>null</code> * if the metric aggregate values have been specified */ public Double getOutboundPacketsDropped() { if (_outboundPacketsDropped == null) { return null; } return _outboundPacketsDropped.getValue(); }
/** * Returns the current value of the receiveRate property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getReceiveRate() { if (_receiveRate == null) { return null; } return _receiveRate.getValue(); }
/** * Returns the current value of the sendRate property This will be <code>null</code> if the metric * aggregate values have been specified */ public Double getSendRate() { if (_sendRate == null) { return null; } return _sendRate.getValue(); }
/** * Returns the current value of the packetsReceived property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getPacketsReceived() { if (_packetsReceived == null) { return null; } return _packetsReceived.getValue(); }
/** * Returns the current value of the packetsSent property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getPacketsSent() { if (_packetsSent == null) { return null; } return _packetsSent.getValue(); }
/** * Returns the current value of the utilization property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getUtilization() { if (_utilization == null) { return null; } return _utilization.getValue(); }
/** * Returns the current value of the bandwidth property This will be <code>null</code> if the * metric aggregate values have been specified */ public Double getBandwidth() { if (_bandwidth == null) { return null; } return _bandwidth.getValue(); }
/** * Adds the relevant portions of this topology sample using the provided node. * * @param submitted Set of objects that have already been submitted * @param currentNode This node currently being submitted * @param unitService An instance of the unit service for converting units. * @throws TopologyException If there are any problems submitting the data for this class. */ @Override protected void addPropertiesToNodeTree( TopologyNode currentNode, UnitService unitService, Set<UUID> submitted) throws TopologyException { super.addPropertiesToNodeTree(currentNode, unitService, submitted); if (!(_name == null)) { final TopologyValue _value104 = currentNode.createValue("name"); _value104.setSampleValue(_name.toString()); if (__isIdentity("name")) { _value104.setIsIdentity(true); } } if (!(_ipAddress == null)) { final TopologyNode _node105 = currentNode.createNode("ipAddress"); if (__isIdentity("ipAddress")) { _node105.setIsIdentity(true); } if (submitted.contains(_ipAddress.__getNodeId())) { // field already submitted, just set the reference ID _node105.setRefId(_ipAddress.__getNodeId().toString()); } else { // Not already submitted, send the entire thing _node105.setTypeHint(_ipAddress.__getNodeName()); _node105.setId(_ipAddress.__getNodeId().toString()); _ipAddress.addToNodeTree(_node105, unitService, submitted); } } if (!(_macAddress == null)) { final TopologyValue _value106 = currentNode.createValue("macAddress"); _value106.setSampleValue(_macAddress.toString()); if (__isIdentity("macAddress")) { _value106.setIsIdentity(true); } } if (!(_interfaceIndex == null)) { final TopologyValue _value107 = currentNode.createValue("interfaceIndex"); _value107.setSampleValue(_interfaceIndex); if (__isIdentity("interfaceIndex")) { _value107.setIsIdentity(true); } } if (!(_portNumber == null)) { final TopologyValue _value108 = currentNode.createValue("portNumber"); _value108.setSampleValue(_portNumber); if (__isIdentity("portNumber")) { _value108.setIsIdentity(true); } } if (!(_interfaceType == null)) { final TopologyValue _value109 = currentNode.createValue("interfaceType"); _value109.setSampleValue(_interfaceType.toString()); if (__isIdentity("interfaceType")) { _value109.setIsIdentity(true); } } if (!(_netmask == null)) { final TopologyValue _value110 = currentNode.createValue("netmask"); _value110.setSampleValue(_netmask.toString()); if (__isIdentity("netmask")) { _value110.setIsIdentity(true); } } if (!(_isLayer2 == null)) { final TopologyValue _value111 = currentNode.createValue("isLayer2"); _value111.setSampleValue(_isLayer2.toString()); if (__isIdentity("isLayer2")) { _value111.setIsIdentity(true); } } if (!(_networkSegment == null)) { final TopologyValue _value112 = currentNode.createValue("networkSegment"); _value112.setSampleValue(_networkSegment.toString()); if (__isIdentity("networkSegment")) { _value112.setIsIdentity(true); } } if (!(_layer2Segment == null)) { final TopologyValue _value113 = currentNode.createValue("layer2Segment"); _value113.setSampleValue(_layer2Segment); if (__isIdentity("layer2Segment")) { _value113.setIsIdentity(true); } } if (!(_discoveryStatus == null)) { final TopologyValue _value114 = currentNode.createValue("discoveryStatus"); _value114.setSampleValue(_discoveryStatus.getValue()); if (__isIdentity("discoveryStatus")) { _value114.setIsIdentity(true); } } if (!(_networks == null)) { for (TopologyObject list_element : _networks) { final TopologyNode _node115 = currentNode.createNode("networks"); if (__isIdentity("networks")) { _node115.setIsIdentity(true); } if (_replace_networks) { _node115.setReplace(true); } _replace_networks = false; if (submitted.contains(list_element.__getNodeId())) { // field already submitted, just set the reference ID _node115.setRefId(list_element.__getNodeId().toString()); } else { // Not already submitted, send the entire thing _node115.setTypeHint(list_element.__getNodeName()); _node115.setId(list_element.__getNodeId().toString()); list_element.addToNodeTree(_node115, unitService, submitted); } } } if (!(_bandwidth == null)) { final TopologyNode _node116 = currentNode.createNode("bandwidth"); _bandwidth.submit(_node116, unitService.getUnits("bit/second")); } if (!(_utilization == null)) { final TopologyNode _node117 = currentNode.createNode("utilization"); _utilization.submit(_node117, unitService.getUnits("percent")); } if (!(_packetsSent == null)) { final TopologyNode _node118 = currentNode.createNode("packetsSent"); _packetsSent.submit(_node118, unitService.getUnits("count/second")); } if (!(_packetsReceived == null)) { final TopologyNode _node119 = currentNode.createNode("packetsReceived"); _packetsReceived.submit(_node119, unitService.getUnits("count/second")); } if (!(_sendRate == null)) { final TopologyNode _node120 = currentNode.createNode("sendRate"); _sendRate.submit(_node120, unitService.getUnits("bit/second")); } if (!(_receiveRate == null)) { final TopologyNode _node121 = currentNode.createNode("receiveRate"); _receiveRate.submit(_node121, unitService.getUnits("bit/second")); } if (!(_inboundPacketsDropped == null)) { final TopologyNode _node122 = currentNode.createNode("inboundPacketsDropped"); _inboundPacketsDropped.submit(_node122, unitService.getUnits("count")); } if (!(_outboundPacketsDropped == null)) { final TopologyNode _node123 = currentNode.createNode("outboundPacketsDropped"); _outboundPacketsDropped.submit(_node123, unitService.getUnits("count")); } if (!(_inboundErrors == null)) { final TopologyNode _node124 = currentNode.createNode("inboundErrors"); _inboundErrors.submit(_node124, unitService.getUnits("count")); } if (!(_outboundErrors == null)) { final TopologyNode _node125 = currentNode.createNode("outboundErrors"); _outboundErrors.submit(_node125, unitService.getUnits("count")); } if (!(_outputQueueLength == null)) { final TopologyNode _node126 = currentNode.createNode("outputQueueLength"); _outputQueueLength.submit(_node126, unitService.getUnits("count")); } }