Class PollableNetwork

    • Constructor Detail

      • PollableNetwork

        public PollableNetwork​(PollContext context)

        Constructor for PollableNetwork.

        Parameters:
        context - a PollContext object.
    • Method Detail

      • createNode

        public PollableNode createNode​(int nodeId,
                                       java.lang.String nodeLabel,
                                       java.lang.String nodeLocation)

        createNode

        Parameters:
        nodeId - a int.
        nodeLabel - a String object.
        nodeLocation - a String object.
        Returns:
        a PollableNode object.
      • createNodeIfNecessary

        public PollableNode createNodeIfNecessary​(int nodeId,
                                                  java.lang.String nodeLabel,
                                                  java.lang.String nodeLocation)

        createNodeIfNecessary

        Parameters:
        nodeId - a int.
        nodeLabel - a String object.
        nodeLocation - a String object.
        Returns:
        a PollableNode object.
      • getNode

        public PollableNode getNode​(int nodeId)

        getNode

        Parameters:
        nodeId - a int.
        Returns:
        a PollableNode object.
      • getNodeIds

        public java.util.List<java.lang.Long> getNodeIds()
      • getNodeCount

        public int getNodeCount()

        getNodeCount

        Returns:
        a int.
      • createInterface

        public PollableInterface createInterface​(int nodeId,
                                                 java.lang.String nodeLabel,
                                                 java.lang.String nodeLocation,
                                                 java.net.InetAddress addr)

        createInterface

        Parameters:
        nodeId - a int.
        nodeLabel - a String object.
        nodeLocation - a String object.
        addr - a InetAddress object.
        Returns:
        a PollableInterface object.
      • getInterface

        public PollableInterface getInterface​(int nodeId,
                                              java.net.InetAddress addr)

        getInterface

        Parameters:
        nodeId - a int.
        addr - a InetAddress object.
        Returns:
        a PollableInterface object.
      • createService

        public PollableService createService​(int nodeId,
                                             java.lang.String nodeLabel,
                                             java.lang.String nodeLocation,
                                             java.net.InetAddress addr,
                                             java.lang.String svcName)

        createService

        Parameters:
        nodeId - a int.
        nodeLabel - a String object.
        nodeLocation - a String object.
        addr - a InetAddress object.
        svcName - a String object.
        Returns:
        a PollableService object.
      • getService

        public PollableService getService​(int nodeId,
                                          java.net.InetAddress addr,
                                          java.lang.String svcName)

        getService

        Parameters:
        nodeId - a int.
        addr - a InetAddress object.
        svcName - a String object.
        Returns:
        a PollableService object.
      • createDownEvent

        public Event createDownEvent​(java.util.Date date)

        createDownEvent

        Specified by:
        createDownEvent in class PollableElement
        Parameters:
        date - a Date object.
        Returns:
        a Event object.
      • createUpEvent

        public Event createUpEvent​(java.util.Date date)

        createUpEvent

        Specified by:
        createUpEvent in class PollableElement
        Parameters:
        date - a Date object.
        Returns:
        a Event object.
      • dump

        public void dump()

        dump

      • processStatusChange

        public void processStatusChange​(java.util.Date date)

        processStatusChange

        Overrides:
        processStatusChange in class PollableContainer
        Parameters:
        date - a Date object.
      • obtainTreeLock

        protected void obtainTreeLock​(long timeout)

        obtainTreeLock

        Overrides:
        obtainTreeLock in class PollableElement
        Parameters:
        timeout - Lock timeout in milliseconds
      • propagateInitialCause

        public void propagateInitialCause()

        propagateInitialCause