use of org.opennms.netmgt.mock.MockVisitorAdapter in project opennms by OpenNMS.
the class PollerQueryManagerDaoIT method createOutages.
private void createOutages(MockElement element, final Event event) {
MockVisitor outageCreater = new MockVisitorAdapter() {
@Override
public void visitService(MockService svc) {
if (svc.getMgmtStatus().equals(SvcMgmtStatus.ACTIVE)) {
m_db.createOutage(svc, event);
}
}
};
element.visit(outageCreater);
}
use of org.opennms.netmgt.mock.MockVisitorAdapter in project opennms by OpenNMS.
the class PollerQueryManagerDaoIT method anticipateServicesDown.
private void anticipateServicesDown(MockElement node) {
MockVisitor eventCreator = new MockVisitorAdapter() {
@Override
public void visitService(MockService svc) {
anticipateDown(svc);
}
};
node.visit(eventCreator);
}
use of org.opennms.netmgt.mock.MockVisitorAdapter in project opennms by OpenNMS.
the class PollerIT method anticipateServicesUp.
private void anticipateServicesUp(MockElement node) {
MockVisitor eventCreator = new MockVisitorAdapter() {
@Override
public void visitService(MockService svc) {
anticipateUp(svc);
}
};
node.visit(eventCreator);
}
use of org.opennms.netmgt.mock.MockVisitorAdapter in project opennms by OpenNMS.
the class PollablesIT method anticipateUnresponsive.
private void anticipateUnresponsive(MockElement element) {
MockVisitor visitor = new MockVisitorAdapter() {
@Override
public void visitService(MockService svc) {
m_eventMgr.getEventAnticipator().anticipateEvent(svc.createUnresponsiveEvent());
}
};
element.visit(visitor);
}
Aggregations