Class SinglePingResponseCallback

    • 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 field responseTime.
      void handleError​(java.net.InetAddress address, EchoPacket request, java.lang.Throwable t)
      handleError
      void handleResponse​(java.net.InetAddress address, EchoPacket response)
      handleResponse
      void handleTimeout​(java.net.InetAddress address, EchoPacket request)
      handleTimeout
      void info​(java.lang.String msg)
      info
      void info​(java.lang.String msg, java.lang.Throwable t)
      info
      void rethrowError()  
      void waitFor()
      waitFor
      void waitFor​(long timeout)
      waitFor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SinglePingResponseCallback

        public SinglePingResponseCallback​(java.net.InetAddress host)

        Constructor for SinglePingResponseCallback.

        Parameters:
        host - a InetAddress object.
    • Method Detail

      • handleTimeout

        public void handleTimeout​(java.net.InetAddress address,
                                  EchoPacket request)

        handleTimeout

        Specified by:
        handleTimeout in interface PingResponseCallback
        Parameters:
        address - a InetAddress object.
        request - TODO
      • handleError

        public void handleError​(java.net.InetAddress address,
                                EchoPacket request,
                                java.lang.Throwable t)

        handleError

        Specified by:
        handleError in interface PingResponseCallback
        Parameters:
        address - a InetAddress object.
        request - a EchoPacket object.
        t - a Throwable 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 - a String object.
      • info

        public void info​(java.lang.String msg,
                         java.lang.Throwable t)

        info

        Parameters:
        msg - a String object.
        t - a Throwable object.