public final class PingReply extends Object implements org.opennms.protocols.rt.ResponseWithId<PingRequestId>
This class is use to encapsulate an ICMP reply that conforms to the
packet
class. The reply must be of type ICMP Echo Reply and be
the correct length.
When constructed by the create
method the returned reply
encapsulates the sender's address and the received packet as final,
non-mutable values for the instance.
Constructor and Description |
---|
PingReply(org.smslib.InboundMessage pkt,
long receiveTime)
Constructs a new reply with the packet as the contents
of the reply.
|
Modifier and Type | Method and Description |
---|---|
org.smslib.InboundMessage |
getPacket()
getPacket
|
long |
getReceiveTimestamp()
getReceiveTimestamp
|
PingRequestId |
getRequestId()
getRequestId
|
void |
setReceiveTimestamp(long millis)
setReceiveTimestamp
|
public PingReply(org.smslib.InboundMessage pkt, long receiveTime)
pkt
- The received packet.receiveTime
- a long.public PingRequestId getRequestId()
getRequestId
getRequestId
in interface org.opennms.protocols.rt.ResponseWithId<PingRequestId>
PingRequestId
object.public org.smslib.InboundMessage getPacket()
getPacket
InboundMessage
object.public void setReceiveTimestamp(long millis)
setReceiveTimestamp
millis
- a long.public long getReceiveTimestamp()
getReceiveTimestamp
Copyright © 2015. All Rights Reserved.