Class MdReplier

java.lang.Object
com.trdp.md.MdReplier
All Implemented Interfaces:
AutoCloseable

public class MdReplier extends Object implements AutoCloseable
  • Constructor Details

    • MdReplier

      public MdReplier(int port, MdRequestHandler handler) throws IOException
      Throws:
      IOException
    • MdReplier

      public MdReplier(int port, MdRequestHandler handler, long confirmTimeoutUs) throws IOException
      Throws:
      IOException
    • MdReplier

      public MdReplier(int port, MdRequestHandler handler, long confirmTimeoutUs, InetAddress bindAddress, int ttl, int qos) throws IOException
      Creates an MD replier with custom socket options.
      Parameters:
      port - the port to listen on (UDP and TCP)
      handler - the request handler callback
      confirmTimeoutUs - the confirmation timeout in microseconds
      bindAddress - the local address to bind to, or null for wildcard
      ttl - the IP time-to-live for outgoing packets
      qos - the QoS value (IP Precedence 0..7)
      Throws:
      IOException - if socket creation fails
  • Method Details

    • setTopologyCounters

      public void setTopologyCounters(int etbTopoCnt, int opTrnTopoCnt)
    • getConfirmTimeoutUs

      public long getConfirmTimeoutUs()
    • getPendingConfirmationCount

      public int getPendingConfirmationCount()
    • start

      public void start()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable