Class TrafficNodeMonitor<T>

  • public class TrafficNodeMonitor<T>
    extends BaseNodeMonitor<T>
    This node monitor is responsible for maintaining the state of a monitored node. It has the following properties:
    • A node is taken out of operation if it gives no response in 10 s
    • A node is put back in operation when it responds correctly again
    Steinar Knutsen
    • Constructor Detail

      • TrafficNodeMonitor

        public TrafficNodeMonitor​(T node,
                                  MonitorConfiguration configuration,
                                  boolean internal)
        Creates a new node monitor for a node
    • Method Detail

      • failed

        public void failed​(ErrorMessage error)
        Called when this node fails.
        Specified by:
        failed in class BaseNodeMonitor<T>
        error - a container which should contain a short description
      • responded

        public void responded()
        Called when a response is received from this node.
        Specified by:
        responded in class BaseNodeMonitor<T>
      • isKnownWorking

        public java.lang.Boolean isKnownWorking()
        Returns whether this node is currently is a state suitable for receiving traffic, or null if not known
      • setWorking

        protected void setWorking​(boolean working,
                                  java.lang.String explanation)
        Thread-safely changes the state of this node if required
        Specified by:
        setWorking in class BaseNodeMonitor<T>