Search in sources :

Example 11 with MockVisitor

use of org.opennms.netmgt.mock.MockVisitor in project opennms by OpenNMS.

the class PollerQueryManagerDaoIT method anticipateServicesUp.

private void anticipateServicesUp(MockElement node) {
    MockVisitor eventCreator = new MockVisitorAdapter() {

        @Override
        public void visitService(MockService svc) {
            anticipateUp(svc);
        }
    };
    node.visit(eventCreator);
}
Also used : MockVisitorAdapter(org.opennms.netmgt.mock.MockVisitorAdapter) MockVisitor(org.opennms.netmgt.mock.MockVisitor) MockService(org.opennms.netmgt.mock.MockService)

Example 12 with MockVisitor

use of org.opennms.netmgt.mock.MockVisitor 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);
}
Also used : MockVisitorAdapter(org.opennms.netmgt.mock.MockVisitorAdapter) MockVisitor(org.opennms.netmgt.mock.MockVisitor) MockService(org.opennms.netmgt.mock.MockService)

Example 13 with MockVisitor

use of org.opennms.netmgt.mock.MockVisitor 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);
}
Also used : MockVisitorAdapter(org.opennms.netmgt.mock.MockVisitorAdapter) MockVisitor(org.opennms.netmgt.mock.MockVisitor) MockService(org.opennms.netmgt.mock.MockService)

Example 14 with MockVisitor

use of org.opennms.netmgt.mock.MockVisitor 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);
}
Also used : MockVisitorAdapter(org.opennms.netmgt.mock.MockVisitorAdapter) MockVisitor(org.opennms.netmgt.mock.MockVisitor) MockService(org.opennms.netmgt.mock.MockService)

Aggregations

MockService (org.opennms.netmgt.mock.MockService)14 MockVisitor (org.opennms.netmgt.mock.MockVisitor)14 MockVisitorAdapter (org.opennms.netmgt.mock.MockVisitorAdapter)14 MockInterface (org.opennms.netmgt.mock.MockInterface)3 MockNode (org.opennms.netmgt.mock.MockNode)3 ArrayList (java.util.ArrayList)2 PollAnticipator (org.opennms.netmgt.mock.PollAnticipator)2 Event (org.opennms.netmgt.xml.event.Event)2 MockPathOutage (org.opennms.netmgt.mock.MockPathOutage)1