Module bus.http

Class Http2Connection.Listener

java.lang.Object
org.miaixz.bus.http.metric.http.Http2Connection.Listener
Direct Known Subclasses:
RealConnection
Enclosing class:
Http2Connection

public abstract static class Http2Connection.Listener extends Object
Listener of streams and settings initiated by the peer.
  • Field Details

  • Constructor Details

    • Listener

      public Listener()
  • Method Details

    • onStream

      public abstract void onStream(Http2Stream stream) throws IOException
      Handle a new stream from this connection's peer. Implementations should respond by either replying to the stream or closing it. This response does not need to be synchronous.
      Parameters:
      stream - The new stream.
      Throws:
      IOException - if an I/O error occurs.
    • onSettings

      public void onSettings(Http2Connection connection)
      Notification that the connection's peer's settings may have changed. Implementations should take appropriate action to handle the updated settings. It is the implementation's responsibility to handle concurrent calls to this method. A remote peer that sends multiple settings frames will trigger multiple calls to this method, and those calls are not necessarily serialized.
      Parameters:
      connection - The connection with the updated settings.