Class BasicPingHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Callback<java.lang.Boolean> callback  
      private static byte[] PING_MESSAGE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      Triggered to cancel the message exchange.
      void consumeResponse​(java.nio.ByteBuffer feedback)
      Triggered to signal receipt of a ping response message.
      void failed​(java.lang.Exception cause)
      Triggered to signal a failure in data processing.
      java.nio.ByteBuffer getData()
      Returns content of ping message.
      • Methods inherited from class java.lang.Object

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

      • PING_MESSAGE

        private static final byte[] PING_MESSAGE
      • callback

        private final Callback<java.lang.Boolean> callback
    • Constructor Detail

      • BasicPingHandler

        public BasicPingHandler​(Callback<java.lang.Boolean> callback)
    • Method Detail

      • getData

        public java.nio.ByteBuffer getData()
        Description copied from interface: AsyncPingHandler
        Returns content of ping message.
        Specified by:
        getData in interface AsyncPingHandler
        Returns:
        the ping message content.
      • consumeResponse

        public void consumeResponse​(java.nio.ByteBuffer feedback)
                             throws HttpException,
                                    java.io.IOException
        Description copied from interface: AsyncPingHandler
        Triggered to signal receipt of a ping response message.
        Specified by:
        consumeResponse in interface AsyncPingHandler
        Parameters:
        feedback - the ping message feedback.
        Throws:
        HttpException
        java.io.IOException
      • failed

        public void failed​(java.lang.Exception cause)
        Description copied from interface: AsyncPingHandler
        Triggered to signal a failure in data processing.
        Specified by:
        failed in interface AsyncPingHandler
        Parameters:
        cause - the cause of the failure.