org.opennms.netmgt.ping
Class PingRequest
java.lang.Object
org.opennms.netmgt.ping.PingRequest
- All Implemented Interfaces:
- Comparable<Delayed>, Delayed
public final class PingRequest
- extends Object
- implements Delayed
This class is used to encapsulate a ping request. A request consist of
the pingable address and a signaled state.
- Author:
- Ben Reed, Mathew Brozowski
FILTER_ID
public static final short FILTER_ID
getAddress
public InetAddress getAddress()
getTid
public long getTid()
getSequenceId
public short getSequenceId()
getRetries
public int getRetries()
getTimeout
public long getTimeout()
getRequest
public org.opennms.protocols.icmp.ICMPEchoPacket getRequest()
getResponse
public org.opennms.protocols.icmp.ICMPEchoPacket getResponse()
getExpiration
public long getExpiration()
sendRequest
public void sendRequest(org.opennms.protocols.icmp.IcmpSocket icmpSocket)
- Send this PingRequest through the given icmpSocket
- Parameters:
icmpSocket -
createRequestPacket
public void createRequestPacket()
processResponse
public void processResponse(org.opennms.protocols.icmp.ICMPEchoPacket packet)
processTimeout
public PingRequest processTimeout()
isExpired
public boolean isExpired()
toString
public String toString()
- Overrides:
toString in class Object
getDelay
public long getDelay(TimeUnit unit)
- Specified by:
getDelay in interface Delayed
compareTo
public int compareTo(Delayed request)
- Specified by:
compareTo in interface Comparable<Delayed>
getId
public PingRequest.RequestId getId()
processError
public void processError(Throwable t)
Copyright ? 2008. All Rights Reserved.