@Test public void testDisabledCollection() throws Exception { initFactories("/threshd-configuration.xml","/test-thresholds-bug3428.xml"); Integer ifIndex = 1; Long ifSpeed = 100000000l; String ifName = "wlan0"; addHighThresholdEvent(1, 90, 50, 120, ifName, ifIndex.toString(), "ifInOctets", ifName, ifIndex.toString()); SnmpIfData ifData = createSnmpIfData("127.0.0.1", ifName, ifSpeed, ifIndex, false); CollectionAgent agent = createCollectionAgent(); IfResourceType resourceType = createInterfaceResourceType(agent); ThresholdingVisitor visitor = createVisitor(); SnmpCollectionResource resource = new IfInfo(resourceType, agent, ifData); addAttributeToCollectionResource(resource, resourceType, "ifInOctets", "counter", "ifIndex", 10000); addAttributeToCollectionResource(resource, resourceType, "ifOutOctets", "counter", "ifIndex", 10000); resource.visit(visitor); resource = new IfInfo(resourceType, agent, ifData); addAttributeToCollectionResource(resource, resourceType, "ifInOctets", "counter", "ifIndex", 46000); addAttributeToCollectionResource(resource, resourceType, "ifOutOctets", "counter", "ifIndex", 46000); resource.visit(visitor); EasyMock.verify(agent); verifyEvents(1); }
@Override public String toString() { return "ThresholdingVisitor for " + m_thresholdingSet; }
ThresholdingVisitor extends AbstractCollectionSetVisitor { @Override public String toString() { return "ThresholdingVisitor for " + m_thresholdingSet; } }
ThresholdingVisitor extends AbstractCollectionSetVisitor { @Override public String toString() { return "ThresholdingVisitor for " + m_thresholdingSet; } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); }
ThresholdingVisitor extends AbstractCollectionSetVisitor { @Override public String toString() { return "ThresholdingVisitor for " + m_thresholdingSet; } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); static ThresholdingVisitor create(int nodeId, String hostAddress, String serviceName, RrdRepository repo, ServiceParameters svcParams); boolean hasThresholds(); @Override void visitCollectionSet(CollectionSet set); void reload(); void reloadScheduledOutages(); boolean isNodeInOutage(); @Override void visitResource(CollectionResource resource); @Override void visitAttribute(CollectionAttribute attribute); @Override void completeResource(CollectionResource resource); Date getCollectionTimestamp(); @Override String toString(); }
ThresholdingVisitor extends AbstractCollectionSetVisitor { @Override public String toString() { return "ThresholdingVisitor for " + m_thresholdingSet; } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); static ThresholdingVisitor create(int nodeId, String hostAddress, String serviceName, RrdRepository repo, ServiceParameters svcParams); boolean hasThresholds(); @Override void visitCollectionSet(CollectionSet set); void reload(); void reloadScheduledOutages(); boolean isNodeInOutage(); @Override void visitResource(CollectionResource resource); @Override void visitAttribute(CollectionAttribute attribute); @Override void completeResource(CollectionResource resource); Date getCollectionTimestamp(); @Override String toString();  }