org.opennms.netmgt.icmp.jna
Class AbstractPinger<T extends InetAddress>
java.lang.Object
org.opennms.netmgt.icmp.jna.AbstractPinger<T>
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- V4Pinger, V6Pinger
public abstract class AbstractPinger<T extends InetAddress>
- extends Object
- implements Runnable
JnaPinger
- Author:
- brozow
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
run |
NANOS_PER_MILLI
public static final double NANOS_PER_MILLI
- See Also:
- Constant Field Values
AbstractPinger
protected AbstractPinger(int pingerId,
NativeDatagramSocket pingSocket)
getPingSocket
protected NativeDatagramSocket getPingSocket()
- Returns:
- the pingSocket
getPingerId
protected int getPingerId()
isFinished
public boolean isFinished()
start
public void start()
stop
public void stop()
throws InterruptedException
- Throws:
InterruptedException
closeSocket
public void closeSocket()
ping
public abstract void ping(T addr,
int identifier,
int sequenceNumber,
long threadId,
long count,
long interval)
throws InterruptedException
- Throws:
InterruptedException
addPingReplyListener
public void addPingReplyListener(PingReplyListener listener)
notifyPingListeners
protected void notifyPingListeners(InetAddress address,
EchoPacket echoReply)
setThrowable
protected void setThrowable(Throwable e)
Copyright © 2011. All Rights Reserved.