org.opennms.netmgt.ping
Class PingRequest

java.lang.Object
  extended by 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

Nested Class Summary
static class PingRequest.RequestId
           
 
Field Summary
static short FILTER_ID
           
 
Method Summary
 int compareTo(Delayed request)
           
 void createRequestPacket()
           
 InetAddress getAddress()
           
 long getDelay(TimeUnit unit)
           
 long getExpiration()
           
 PingRequest.RequestId getId()
           
 org.opennms.protocols.icmp.ICMPEchoPacket getRequest()
           
 org.opennms.protocols.icmp.ICMPEchoPacket getResponse()
           
 int getRetries()
           
 short getSequenceId()
           
 long getTid()
           
 long getTimeout()
           
 boolean isExpired()
           
 void processError(Throwable t)
           
 void processResponse(org.opennms.protocols.icmp.ICMPEchoPacket packet)
           
 PingRequest processTimeout()
           
 void sendRequest(org.opennms.protocols.icmp.IcmpSocket icmpSocket)
          Send this PingRequest through the given icmpSocket
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FILTER_ID

public static final short FILTER_ID
Method Detail

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.