org.opennms.jicmp.standalone
Class AbstractPinger<T extends InetAddress>
java.lang.Object
org.opennms.jicmp.standalone.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 |
m_throwable
protected final AtomicReference<Throwable> m_throwable
m_metric
protected final Metric m_metric
AbstractPinger
protected AbstractPinger(NativeDatagramSocket pingSocket)
getPingSocket
protected NativeDatagramSocket getPingSocket()
- Returns:
- the pingSocket
getCount
public int getCount()
isFinished
public boolean isFinished()
start
public void start()
stop
public void stop()
throws InterruptedException
- Throws:
InterruptedException
closeSocket
public void closeSocket()
getListeners
protected List<PingReplyListener> getListeners()
ping
public abstract PingReplyMetric ping(T addr,
int id,
int sequenceNumber,
int count,
long interval)
throws InterruptedException
- Throws:
InterruptedException
addPingReplyListener
public void addPingReplyListener(PingReplyListener listener)
Copyright © 2011. All Rights Reserved.