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