public class JnaPingRequest extends Object implements org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>, EchoPacket
Constructor and Description |
---|
JnaPingRequest(InetAddress addr,
int identifier,
int sequenceId,
long timeout,
int retries,
int packetsize,
PingResponseCallback cb) |
JnaPingRequest(InetAddress addr,
int identifier,
int sequenceId,
long threadId,
long timeout,
int retries,
int packetsize,
PingResponseCallback cb) |
JnaPingRequest(JnaPingRequestId id,
long timeout,
int retries,
int packetsize,
PingResponseCallback cb) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Delayed request)
compareTo
|
double |
elapsedTime(TimeUnit timeUnit)
Returns the round trip time in the requested TimeUnit
(note that a fractional value will be returned if necessary)
|
InetAddress |
getAddress() |
long |
getDelay(TimeUnit unit) |
JnaPingRequestId |
getId()
getId
|
int |
getIdentifier() |
static long |
getNextTID() |
long |
getReceivedTimeNanos() |
long |
getSentTimeNanos() |
int |
getSequenceNumber() |
long |
getThreadId() |
boolean |
isEchoReply() |
boolean |
isExpired()
isExpired
|
boolean |
isProcessed()
isProcessed
|
void |
processError(Throwable t) |
boolean |
processResponse(JnaPingReply reply)
processResponse
|
JnaPingRequest |
processTimeout()
processTimeout
|
void |
send(V4Pinger v4,
Inet4Address addr4) |
void |
send(V4Pinger v4,
V6Pinger v6)
Send this V4PingRequest through the given icmpSocket
|
void |
send(V6Pinger v6,
Inet6Address addr6) |
String |
toString()
toString
|
public JnaPingRequest(JnaPingRequestId id, long timeout, int retries, int packetsize, PingResponseCallback cb)
public JnaPingRequest(InetAddress addr, int identifier, int sequenceId, long threadId, long timeout, int retries, int packetsize, PingResponseCallback cb)
public JnaPingRequest(InetAddress addr, int identifier, int sequenceId, long timeout, int retries, int packetsize, PingResponseCallback cb)
public static final long getNextTID()
public boolean processResponse(JnaPingReply reply)
processResponse
processResponse
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
reply
- a org.opennms.netmgt.icmp.spi.JnaPingReply.PingReply
object.public JnaPingRequest processTimeout()
processTimeout
processTimeout
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
org.opennms.netmgt.JnaPingRequest.AbstractPingRequest
object.public boolean isExpired()
isExpired
public long getDelay(TimeUnit unit)
getDelay
in interface Delayed
getDelay
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
public int compareTo(Delayed request)
compareTo
compareTo
in interface Comparable<Delayed>
request
- a Delayed
object.public JnaPingRequestId getId()
getId
getId
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
org.opennms.netmgt.icmp.spi.JnaPingRequestId.PingRequestId
object.public void processError(Throwable t)
processError
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
public boolean isProcessed()
isProcessed
isProcessed
in interface org.opennms.protocols.rt.Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>
public void send(V4Pinger v4, V6Pinger v6)
icmpSocket
- a IcmpSocket
object.public InetAddress getAddress()
public void send(V6Pinger v6, Inet6Address addr6)
public void send(V4Pinger v4, Inet4Address addr4)
public String toString()
toString
public boolean isEchoReply()
isEchoReply
in interface EchoPacket
public int getIdentifier()
getIdentifier
in interface EchoPacket
public int getSequenceNumber()
getSequenceNumber
in interface EchoPacket
public long getThreadId()
getThreadId
in interface EchoPacket
public long getReceivedTimeNanos()
getReceivedTimeNanos
in interface EchoPacket
public long getSentTimeNanos()
getSentTimeNanos
in interface EchoPacket
public double elapsedTime(TimeUnit timeUnit)
EchoPacket
elapsedTime
in interface EchoPacket
Copyright © 2021. All rights reserved.