Class MdReplier
java.lang.Object
com.trdp.md.MdReplier
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionMdReplier(int port, MdRequestHandler handler) MdReplier(int port, MdRequestHandler handler, long confirmTimeoutUs) MdReplier(int port, MdRequestHandler handler, long confirmTimeoutUs, InetAddress bindAddress, int ttl, int qos) Creates an MD replier with custom socket options. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longintvoidsetTopologyCounters(int etbTopoCnt, int opTrnTopoCnt) voidstart()
-
Constructor Details
-
MdReplier
- Throws:
IOException
-
MdReplier
- 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 callbackconfirmTimeoutUs- the confirmation timeout in microsecondsbindAddress- the local address to bind to, ornullfor wildcardttl- the IP time-to-live for outgoing packetsqos- 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:
closein interfaceAutoCloseable
-