Http2AsyncUpgradeHandler.AsyncPingManager (Apache Tomcat 9.0.119 API Documentation)
Description: declaration: package: org.apache.coyote.http2, class: Http2AsyncUpgradeHandler, class: AsyncPingManager

# Class Http2AsyncUpgradeHandler.AsyncPingManager

java.lang.Object
org.apache.coyote.http2.Http2AsyncUpgradeHandler.AsyncPingManager

Enclosing class:
  `Http2AsyncUpgradeHandler`

protected class Http2AsyncUpgradeHandler.AsyncPingManager extends Object
Asynchronous ping manager for HTTP/2 connections.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AsyncPingManager()`
  Constructs a new AsyncPingManager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `receivePing(byte[] payload, boolean ack)`
  Handle a received PING frame.
  `void`
  `sendPing(boolean force)`
  Check to see if a ping was sent recently and, if not, send one.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AsyncPingManager

    public AsyncPingManager()
    Constructs a new AsyncPingManager.

- ## Method Details

  - ### sendPing

    public void sendPing(boolean force) throws IOException
    Check to see if a ping was sent recently and, if not, send one.
    Parameters:
      `force` - Send a ping, even if one was sent recently
    Throws:
      `IOException` - If an I/O issue prevents the ping from being sent

  - ### receivePing

    public void receivePing(byte[] payload, boolean ack) throws IOException
    Handle a received PING frame.
    Parameters:
      `payload` - the PING payload
      `ack` - whether this is a PING ACK
    Throws:
      `IOException` - if an I/O error occurs