Class MockNetwork

    • Constructor Detail

      • MockNetwork

        public MockNetwork()

        Constructor for MockNetwork.

    • Method Detail

      • getCriticalService

        public java.lang.String getCriticalService()

        getCriticalService

        Returns:
        a String object.
      • setCriticalService

        public void setCriticalService​(java.lang.String svcName)

        setCriticalService

        Parameters:
        svcName - a String object.
      • getIfAlias

        public java.lang.String getIfAlias()

        getIfAlias

        Returns:
        a String object.
      • setIfAlias

        public void setIfAlias​(java.lang.String ifAlias)

        setIfAlias

        Parameters:
        ifAlias - a String object.
      • setIfIndex

        public void setIfIndex​(int ifIndex)

        setIfIndex

        Parameters:
        ifIndex -
      • addInterface

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

        addInterface

        Parameters:
        nodeId - a int.
        ipAddr - a String object.
        Returns:
        a MockInterface object.
      • addInterface

        public MockInterface addInterface​(java.lang.String ipAddr)

        addInterface

        Parameters:
        ipAddr - a String object.
        Returns:
        a MockInterface object.
      • addNode

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

        addNode

        Parameters:
        nodeid - a int.
        label - a String object.
        Returns:
        a MockNode object.
      • addPathOutage

        public MockPathOutage addPathOutage​(int nodeid,
                                            java.net.InetAddress ipAddr,
                                            java.lang.String svcName)
      • addService

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

        addService

        Parameters:
        nodeId - a int.
        ipAddr - a String object.
        svcName - a String object.
        Returns:
        a MockService object.
      • addService

        public MockService addService​(java.lang.String svcName)

        addService

        Parameters:
        svcName - a String object.
        Returns:
        a MockService object.
      • getIdToNameMap

        public java.util.Map<java.lang.Integer,​java.lang.String> getIdToNameMap()

        getIdToNameMap

        Returns:
        a Map object.
      • getInterface

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

        getInterface

        Parameters:
        nodeid - a int.
        ipAddr - a String object.
        Returns:
        a MockInterface object.
      • getInvalidPollCount

        public int getInvalidPollCount()

        getInvalidPollCount

        Returns:
        a int.
      • getNameToIdMap

        public java.util.Map<java.lang.String,​java.lang.Integer> getNameToIdMap()

        getNameToIdMap

        Returns:
        a Map object.
      • getNode

        public MockNode getNode​(int i)

        getNode

        Parameters:
        i - a int.
        Returns:
        a MockNode object.
      • getNodeIdForInterface

        public int getNodeIdForInterface​(java.lang.String ipAddr)

        getNodeIdForInterface

        Parameters:
        ipAddr - a String object.
        Returns:
        a int.
      • getService

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

        getService

        Parameters:
        nodeid - a int.
        ipAddr - a String object.
        svcName - a String object.
        Returns:
        a MockService object.
      • getServices

        public java.util.List<MockService> getServices​(int nodeId)
      • receivedInvalidPoll

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

        receivedInvalidPoll

        Parameters:
        ipAddr - a String object.
        svcName - a String object.
      • removeElement

        public void removeElement​(MockElement element)

        removeElement

        Parameters:
        element - a MockElement object.
      • removeInterface

        public void removeInterface​(MockInterface iface)

        removeInterface

        Parameters:
        iface - a MockInterface object.
      • removeNode

        public void removeNode​(MockNode node)

        removeNode

        Parameters:
        node - a MockNode object.
      • removeService

        public void removeService​(MockService svc)

        removeService

        Parameters:
        svc - a MockService object.
      • resetInvalidPollCount

        public void resetInvalidPollCount()

        resetInvalidPollCount

      • getNodeCount

        public int getNodeCount()

        getNodeCount

        Returns:
        a int.
      • getInterfaceCount

        public int getInterfaceCount()

        getInterfaceCount

        Returns:
        a int.
      • getServiceCount

        public int getServiceCount()

        getServiceCount

        Returns:
        a int.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • createStandardNetwork

        public void createStandardNetwork()

        createStandardNetwork