org.opennms.sms.ping.internal
Class PingReply

java.lang.Object
  extended by org.opennms.sms.ping.internal.PingReply
All Implemented Interfaces:
org.opennms.protocols.rt.Response, org.opennms.protocols.rt.ResponseWithId<PingRequestId>

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 packetclass. 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.

Version:
$Id: $
Author:
Brian Weaver , Sowmya , OpenNMS , Brian Weaver , Sowmya , OpenNMS , Brian Weaver , Sowmya , OpenNMS

Constructor Summary
PingReply(org.smslib.InboundMessage pkt, long receiveTime)
          Constructs a new reply with the packet as the contents of the reply.
 
Method Summary
 org.smslib.InboundMessage getPacket()
          getPacket
 long getReceiveTimestamp()
          getReceiveTimestamp
 PingRequestId getRequestId()
          getRequestId
 void setReceiveTimestamp(long millis)
          setReceiveTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingReply

public PingReply(org.smslib.InboundMessage pkt,
                 long receiveTime)
Constructs a new reply with the packet as the contents of the reply.

Parameters:
pkt - The received packet.
receiveTime - a long.
Method Detail

getRequestId

public PingRequestId getRequestId()

getRequestId

Specified by:
getRequestId in interface org.opennms.protocols.rt.ResponseWithId<PingRequestId>
Returns:
a PingRequestId object.

getPacket

public org.smslib.InboundMessage getPacket()

getPacket

Returns:
a InboundMessage object.

setReceiveTimestamp

public void setReceiveTimestamp(long millis)

setReceiveTimestamp

Parameters:
millis - a long.

getReceiveTimestamp

public long getReceiveTimestamp()

getReceiveTimestamp

Returns:
a long.


Copyright © 2011. All Rights Reserved.