com.veraxsystems.icmp.ping
Interface PingResponseHandler

All Known Implementing Classes:
BlockingPing

public interface PingResponseHandler

The Ping result handler interface. It is used for asynchronous handling of Ping results.


Method Summary
 void handleException(PingRequest request, java.lang.Exception exception)
          Method called by Ping in case exception occurred when receiving ICMP echo response.
 void handleResponse(PingRequest request, IcmpEchoResponse response)
          Method called by Ping on receiving proper ICMP echo response.
 void handleTimeout(PingRequest request)
          Method called by Ping in case timeout occurred when receiving ICMP echo response.
 

Method Detail

handleResponse

void handleResponse(PingRequest request,
                    IcmpEchoResponse response)
Method called by Ping on receiving proper ICMP echo response.

Parameters:
request - the descriptor of request issued by echo() method
response - ICMP response received

handleTimeout

void handleTimeout(PingRequest request)
Method called by Ping in case timeout occurred when receiving ICMP echo response.

Parameters:
request - the descriptor of request issued by echo() method

handleException

void handleException(PingRequest request,
                     java.lang.Exception exception)
Method called by Ping in case exception occurred when receiving ICMP echo response. Such situation means fatal error of Ping class so it is very probable it will not work any more.

Parameters:
request - the descriptor of request issued by echo() method
exception - exception occurred