Class BasicPingHandler

java.lang.Object
org.apache.hc.core5.http2.nio.support.BasicPingHandler
All Implemented Interfaces:
AsyncPingHandler

public class BasicPingHandler extends Object implements AsyncPingHandler
Basic AsyncPingHandler implementation.
Since:
5.0
  • Constructor Details

    • BasicPingHandler

      public BasicPingHandler(org.apache.hc.core5.function.Callback<Boolean> callback)
  • Method Details

    • getData

      public 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(ByteBuffer feedback) throws org.apache.hc.core5.http.HttpException, 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:
      org.apache.hc.core5.http.HttpException - in case of HTTP protocol violation.
      IOException - in case of an I/O error.
    • failed

      public void failed(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.
    • cancel

      public void cancel()
      Description copied from interface: AsyncPingHandler
      Triggered to cancel the message exchange.
      Specified by:
      cancel in interface AsyncPingHandler