OpenNMS API 1.2.9

## org.opennms.netmgt.mock
Class MockNetwork

    java.lang.Object
      org.opennms.netmgt.mock.MockElement
          org.opennms.netmgt.mock.MockContainer
              org.opennms.netmgt.mock.MockNetwork

public class MockNetwork
extends MockContainer

A test network configuration

Author:
  brozow

Field Summary
`private java.lang.String` `m_criticalService`
`private MockInterface` `m_currentInterface`
`private MockNode` `m_currentNode`
`private long` `m_defaultInterval`
`private java.util.Map` `m_idToNameMap`
`private java.lang.String` `m_ifAlias`
`private int` `m_invalidPollCount`
`private java.util.Map` `m_nameToIdMap`
`private int` `m_nextServiceId`

Fields inherited from class org.opennms.netmgt.mock.MockContainer
``

Fields inherited from class org.opennms.netmgt.mock.MockElement
`m_parent`

Constructor Summary
`MockNetwork()`

Method Summary
`MockInterface` `addInterface(int nodeId, java.lang.String ipAddr)`
`MockInterface` `addInterface(java.lang.String ipAddr)`
`MockNode` `addNode(int nodeid, java.lang.String label)`
`MockService` `addService(int nodeId, java.lang.String ipAddr, java.lang.String svcName)`
`MockService` `addService(java.lang.String svcName)`
`Event` `createDeleteEvent()`
`Event` `createDownEvent()`
`Event` `createUpEvent()`
`java.lang.String` `getCriticalService()`
`java.util.Map` `getIdToNameMap()`
`java.lang.String` `getIfAlias()`
`MockInterface` `getInterface(int nodeid, java.lang.String ipAddr)`
`int` `getInterfaceCount()`
`int` `getInvalidPollCount()`
`(package private) java.lang.Object` `getKey()`
`java.util.Map` `getNameToIdMap()`
`MockNode` `getNode(int i)`
`int` `getNodeCount()`
`int` `getNodeIdForInterface(java.lang.String ipAddr)`
`MockService` `getService(int nodeid, java.lang.String ipAddr, java.lang.String svcName)`
`int` `getServiceCount()`
`private int` `getServiceId(java.lang.String svcName)`
`void` `receivedInvalidPoll(java.lang.String ipAddr, java.lang.String svcName)`
`void` `removeElement(MockElement element)`
`void` `removeInterface(MockInterface iface)`
`void` `removeNode(MockNode node)`
`void` `removeService(MockService svc)`
`void` `resetInvalidPollCount()`
`void` `setCriticalService(java.lang.String svcName)`
`void` `setIfAlias(java.lang.String ifAlias)`
`void` `visit(MockVisitor v)`

Methods inherited from class org.opennms.netmgt.mock.MockContainer
`addAnticipator, addMember, getMember, getMembers, getPollCount, getPollStatus, removeAnticipator, removeMember, resetPollCount, visitMembers`

Methods inherited from class org.opennms.netmgt.mock.MockElement
`bringDown, bringUnresponsive, bringUp, createDownEvent, createUpEvent, getNetwork, getParent, moveTo, setParent`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_currentInterface

    private MockInterface m_currentInterface

### m_currentNode

    private MockNode m_currentNode

### m_defaultInterval

    private long m_defaultInterval

### m_idToNameMap

    private java.util.Map m_idToNameMap

### m_invalidPollCount

    private int m_invalidPollCount

### m_nameToIdMap

    private java.util.Map m_nameToIdMap

### m_criticalService

    private java.lang.String m_criticalService

### m_ifAlias

    private java.lang.String m_ifAlias

### m_nextServiceId

    private int m_nextServiceId

Constructor Detail

### MockNetwork

    public MockNetwork()

Method Detail

### createDownEvent

    public Event createDownEvent()

  Specified by:
    `createDownEvent` in class `MockElement`

### createUpEvent

    public Event createUpEvent()

  Specified by:
    `createUpEvent` in class `MockElement`

### createDeleteEvent

    public Event createDeleteEvent()

  Specified by:
    `createDeleteEvent` in class `MockElement`

### getCriticalService

    public java.lang.String getCriticalService()

### setCriticalService

    public void setCriticalService(java.lang.String svcName)

### getIfAlias

    public java.lang.String getIfAlias()

### setIfAlias

    public void setIfAlias(java.lang.String ifAlias)

### addInterface

    public MockInterface addInterface(int nodeId,
                                      java.lang.String ipAddr)

### addInterface

    public MockInterface addInterface(java.lang.String ipAddr)

### addNode

    public MockNode addNode(int nodeid,
                            java.lang.String label)

### addService

    public MockService addService(int nodeId,
                                  java.lang.String ipAddr,
                                  java.lang.String svcName)

### addService

    public MockService addService(java.lang.String svcName)

### getIdToNameMap

    public java.util.Map getIdToNameMap()

### getInterface

    public MockInterface getInterface(int nodeid,
                                      java.lang.String ipAddr)

### getInvalidPollCount

    public int getInvalidPollCount()

### getKey

    java.lang.Object getKey()

  Specified by:
    `getKey` in class `MockElement`

### getNameToIdMap

    public java.util.Map getNameToIdMap()

### getNode

    public MockNode getNode(int i)

### getNodeIdForInterface

    public int getNodeIdForInterface(java.lang.String ipAddr)

### getService

    public MockService getService(int nodeid,
                                  java.lang.String ipAddr,
                                  java.lang.String svcName)

### getServiceId

    private int getServiceId(java.lang.String svcName)

### receivedInvalidPoll

    public void receivedInvalidPoll(java.lang.String ipAddr,
                                    java.lang.String svcName)

### removeElement

    public void removeElement(MockElement element)

### removeInterface

    public void removeInterface(MockInterface iface)

### removeNode

    public void removeNode(MockNode node)

### removeService

    public void removeService(MockService svc)

### resetInvalidPollCount

    public void resetInvalidPollCount()

### visit

    public void visit(MockVisitor v)

  Overrides:
    `visit` in class `MockContainer`

### getNodeCount

    public int getNodeCount()

### getInterfaceCount

    public int getInterfaceCount()

### getServiceCount

    public int getServiceCount()

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.