public class SinglePingResponseCallback extends Object implements PingResponseCallback
SinglePingResponseCallback class.
| Constructor and Description | 
|---|
SinglePingResponseCallback(InetAddress host)
Constructor for SinglePingResponseCallback. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Throwable | 
getError()  | 
Long | 
getResponseTime()
Getter for the field  
responseTime. | 
void | 
handleError(InetAddress address,
           EchoPacket request,
           Throwable t)
handleError 
 | 
void | 
handleResponse(InetAddress address,
              EchoPacket response)
handleResponse 
 | 
void | 
handleTimeout(InetAddress address,
             EchoPacket request)
handleTimeout 
 | 
void | 
info(String msg)
info 
 | 
void | 
info(String msg,
    Throwable t)
info 
 | 
void | 
rethrowError()  | 
void | 
waitFor()
waitFor 
 | 
void | 
waitFor(long timeout)
waitFor 
 | 
public SinglePingResponseCallback(InetAddress host)
Constructor for SinglePingResponseCallback.
host - a InetAddress object.public void handleResponse(InetAddress address, EchoPacket response)
handleResponse
handleResponse in interface PingResponseCallbackaddress - a InetAddress object.response - a EchoPacket object.public void handleTimeout(InetAddress address, EchoPacket request)
handleTimeout
handleTimeout in interface PingResponseCallbackaddress - a InetAddress object.request - TODOpublic void handleError(InetAddress address, EchoPacket request, Throwable t)
handleError
handleError in interface PingResponseCallbackaddress - a InetAddress object.request - a EchoPacket object.t - a Throwable object.public void waitFor(long timeout)
             throws InterruptedException
waitFor
timeout - a long.InterruptedException - if any.public void waitFor()
             throws InterruptedException
waitFor
InterruptedException - if any.public Long getResponseTime()
Getter for the field responseTime.
Long object.public Throwable getError()
Copyright © 2020. All rights reserved.