public class JnaPingRequest extends Object implements 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)
Indicates how many units of time are remaining until this request times
out.
|
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)
If an error or exception occurs during processing of this request then
processError is called with the error or exception object.
|
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 Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>reply - a org.opennms.netmgt.icmp.spi.JnaPingReply.PingReply object.public JnaPingRequest processTimeout()
processTimeout
processTimeout in interface Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>org.opennms.netmgt.JnaPingRequest.AbstractPingRequest object.public boolean isExpired()
isExpired
public long getDelay(TimeUnit unit)
getDelay in interface DelayedgetDelay in interface 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 Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>org.opennms.netmgt.icmp.spi.JnaPingRequestId.PingRequestId object.public void processError(Throwable t)
processError in interface Request<JnaPingRequestId,JnaPingRequest,JnaPingReply>public boolean isProcessed()
isProcessed
isProcessed in interface 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 EchoPacketpublic int getIdentifier()
getIdentifier in interface EchoPacketpublic int getSequenceNumber()
getSequenceNumber in interface EchoPacketpublic long getThreadId()
getThreadId in interface EchoPacketpublic long getReceivedTimeNanos()
getReceivedTimeNanos in interface EchoPacketpublic long getSentTimeNanos()
getSentTimeNanos in interface EchoPacketpublic double elapsedTime(TimeUnit timeUnit)
EchoPacketelapsedTime in interface EchoPacketCopyright © 2022. All rights reserved.