Interface KeepAliveStrategy

  • All Known Implementing Classes:
    DefaultKeepAliveStrategy
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface KeepAliveStrategy
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean keepAlive​(InetSocketAddress remoteAddress, Request ahcRequest, io.netty.handler.codec.http.HttpRequest nettyRequest, io.netty.handler.codec.http.HttpResponse nettyResponse)
      Determines whether the connection should be kept alive after this HTTP message exchange.
    • Method Detail

      • keepAlive

        boolean keepAlive​(InetSocketAddress remoteAddress,
                          Request ahcRequest,
                          io.netty.handler.codec.http.HttpRequest nettyRequest,
                          io.netty.handler.codec.http.HttpResponse nettyResponse)
        Determines whether the connection should be kept alive after this HTTP message exchange.
        Parameters:
        remoteAddress - the remote InetSocketAddress associated with the request
        ahcRequest - the Request, as built by AHC
        nettyRequest - the HTTP request sent to Netty
        nettyResponse - the HTTP response received from Netty
        Returns:
        true if the connection should be kept alive, false if it should be closed.