Interface ApmServerClient.ConnectionHandler<T>

  • Enclosing class:
    ApmServerClient

    public static interface ApmServerClient.ConnectionHandler<T>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T withConnection​(java.net.HttpURLConnection connection)
      Gets the HttpURLConnection after the connection has been established and returns a result, for example the status code or the response body.
    • Method Detail

      • withConnection

        @Nullable
        T withConnection​(java.net.HttpURLConnection connection)
                  throws java.io.IOException
        Gets the HttpURLConnection after the connection has been established and returns a result, for example the status code or the response body. NOTE: do not call InputStream.close() as that is handled by ApmServerClient
        Parameters:
        connection - the connection
        Returns:
        the result
        Throws:
        java.io.IOException - if an I/O error occurs while handling the connection