java.lang.Object
com.predic8.membrane.core.config.AbstractXmlElement
com.predic8.membrane.core.interceptor.balancer.Node
All Implemented Interfaces:
XMLElement

public class Node extends AbstractXmlElement
  • Constructor Details

    • Node

      public Node(String host, int port)
    • Node

      public Node()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getLost

      public int getLost()
    • getErrors

      public double getErrors()
    • getLastUpTime

      public long getLastUpTime()
    • setLastUpTime

      public void setLastUpTime(long lastUpTime)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
      Description
      The node's host.
      Example
      server3
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
      Default
      80
      Description
      The node's port.
      Example
      8080
    • isUp

      public boolean isUp()
    • isDown

      public boolean isDown()
    • isTakeOut

      public boolean isTakeOut()
    • setStatus

      public void setStatus(Node.Status status)
    • getStatus

      public Node.Status getStatus()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getCounter

      public int getCounter()
    • incCounter

      public void incCounter()
    • clearCounter

      public void clearCounter()
    • collectStatisticsFrom

      public void collectStatisticsFrom(Exchange exc)
    • addThread

      public void addThread()
    • removeThread

      public void removeThread()
    • getThreads

      public int getThreads()
    • getStatisticsByStatusCodes

      public Map<Integer,StatisticCollector> getStatisticsByStatusCodes()
    • write

      public void write(XMLStreamWriter out) throws XMLStreamException
      Specified by:
      write in interface XMLElement
      Overrides:
      write in class AbstractXmlElement
      Throws:
      XMLStreamException
    • parseAttributes

      protected void parseAttributes(XMLStreamReader token)
      Overrides:
      parseAttributes in class AbstractXmlElement
    • getDestinationURL

      public String getDestinationURL(Exchange exc)