Class JnaPingRequest

    • Constructor Detail

      • JnaPingRequest

        public JnaPingRequest​(java.net.InetAddress addr,
                              int identifier,
                              int sequenceId,
                              long threadId,
                              long timeout,
                              int retries,
                              int packetsize,
                              PingResponseCallback cb)
      • JnaPingRequest

        public JnaPingRequest​(java.net.InetAddress addr,
                              int identifier,
                              int sequenceId,
                              long timeout,
                              int retries,
                              int packetsize,
                              PingResponseCallback cb)
    • Method Detail

      • getNextTID

        public static final long getNextTID()
      • processResponse

        public boolean processResponse​(JnaPingReply reply)

        processResponse

        Specified by:
        processResponse in interface org.opennms.protocols.rt.Request<JnaPingRequestId,​JnaPingRequest,​JnaPingReply>
        Parameters:
        reply - a org.opennms.netmgt.icmp.spi.JnaPingReply.PingReply object.
        Returns:
        a boolean.
      • isExpired

        public boolean isExpired()

        isExpired

        Returns:
        a boolean.
      • getDelay

        public long getDelay​(java.util.concurrent.TimeUnit unit)
        Specified by:
        getDelay in interface java.util.concurrent.Delayed
        Specified by:
        getDelay in interface org.opennms.protocols.rt.Request<JnaPingRequestId,​JnaPingRequest,​JnaPingReply>
      • compareTo

        public int compareTo​(java.util.concurrent.Delayed request)

        compareTo

        Specified by:
        compareTo in interface java.lang.Comparable<java.util.concurrent.Delayed>
        Parameters:
        request - a Delayed object.
        Returns:
        a int.
      • send

        public void send​(V4Pinger v4,
                         V6Pinger v6)
        Send this V4PingRequest through the given icmpSocket
        Parameters:
        icmpSocket - a IcmpSocket object.
      • getAddress

        public java.net.InetAddress getAddress()
      • send

        public void send​(V6Pinger v6,
                         java.net.Inet6Address addr6)
      • send

        public void send​(V4Pinger v4,
                         java.net.Inet4Address addr4)
      • toString

        public java.lang.String toString()

        toString

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String object.
      • elapsedTime

        public double elapsedTime​(java.util.concurrent.TimeUnit timeUnit)
        Description copied from interface: EchoPacket
        Returns the round trip time in the requested TimeUnit (note that a fractional value will be returned if necessary)
        Specified by:
        elapsedTime in interface EchoPacket