Package org.opennms.netmgt.icmp
Class SinglePingResponseCallback
- java.lang.Object
-
- org.opennms.netmgt.icmp.SinglePingResponseCallback
-
- All Implemented Interfaces:
PingResponseCallback
public class SinglePingResponseCallback extends Object implements PingResponseCallback
SinglePingResponseCallback class.
- Author:
- Ben Reed, Mathew Brozowski
-
-
Constructor Summary
Constructors Constructor Description SinglePingResponseCallback(InetAddress host)
Constructor for SinglePingResponseCallback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwable
getError()
Long
getResponseTime()
Getter for the fieldresponseTime
.void
handleError(InetAddress address, EchoPacket request, Throwable t)
handleErrorvoid
handleResponse(InetAddress address, EchoPacket response)
handleResponsevoid
handleTimeout(InetAddress address, EchoPacket request)
handleTimeoutvoid
info(String msg)
infovoid
info(String msg, Throwable t)
infovoid
rethrowError()
void
waitFor()
waitForvoid
waitFor(long timeout)
waitFor
-
-
-
Constructor Detail
-
SinglePingResponseCallback
public SinglePingResponseCallback(InetAddress host)
Constructor for SinglePingResponseCallback.
- Parameters:
host
- aInetAddress
object.
-
-
Method Detail
-
handleResponse
public void handleResponse(InetAddress address, EchoPacket response)
handleResponse
- Specified by:
handleResponse
in interfacePingResponseCallback
- Parameters:
address
- aInetAddress
object.response
- aEchoPacket
object.
-
handleTimeout
public void handleTimeout(InetAddress address, EchoPacket request)
handleTimeout
- Specified by:
handleTimeout
in interfacePingResponseCallback
- Parameters:
address
- aInetAddress
object.request
- TODO
-
handleError
public void handleError(InetAddress address, EchoPacket request, Throwable t)
handleError
- Specified by:
handleError
in interfacePingResponseCallback
- Parameters:
address
- aInetAddress
object.request
- aEchoPacket
object.t
- aThrowable
object.
-
waitFor
public void waitFor(long timeout) throws InterruptedException
waitFor
- Parameters:
timeout
- a long.- Throws:
InterruptedException
- if any.
-
waitFor
public void waitFor() throws InterruptedException
waitFor
- Throws:
InterruptedException
- if any.
-
getResponseTime
public Long getResponseTime()
Getter for the field
responseTime
.- Returns:
- a
Long
object.
-
getError
public Throwable getError()
-
-