Module bus.http

Class Internal

java.lang.Object
org.miaixz.bus.http.metric.Internal

public abstract class Internal extends Object
Provides a mechanism to access internal APIs within the org.miaixz.bus.http package. The only implementation of this abstract class is in Httpd.
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • instance

      public static Internal instance
      The singleton instance of this internal API.
  • Constructor Details

    • Internal

      public Internal()
  • Method Details

    • addLenient

      public abstract void addLenient(Headers.Builder builder, String line)
      Adds a lenient header line to the Headers.Builder.
      Parameters:
      builder - The headers builder.
      line - The header line to add.
    • addLenient

      public abstract void addLenient(Headers.Builder builder, String name, String value)
      Adds a lenient header name and value to the Headers.Builder.
      Parameters:
      builder - The headers builder.
      name - The header name.
      value - The header value.
    • realConnectionPool

      public abstract RealConnectionPool realConnectionPool(ConnectionPool connectionPool)
      Returns the real connection pool from the given connection pool.
      Parameters:
      connectionPool - The connection pool.
      Returns:
      The real connection pool.
    • equalsNonHost

      public abstract boolean equalsNonHost(Address a, Address b)
      Checks if two Address instances are equal, ignoring the host.
      Parameters:
      a - The first address.
      b - The second address.
      Returns:
      true if the non-host parts of the addresses are equal.
    • code

      public abstract int code(Response.Builder responseBuilder)
      Returns the HTTP status code from a Response.Builder.
      Parameters:
      responseBuilder - The response builder.
      Returns:
      The HTTP status code.
    • apply

      public abstract void apply(ConnectionSuite tlsConfiguration, SSLSocket sslSocket, boolean isFallback)
      Applies the given ConnectionSuite to the SSLSocket.
      Parameters:
      tlsConfiguration - The TLS configuration to apply.
      sslSocket - The SSL socket.
      isFallback - Whether this is a fallback connection.
    • newWebSocketCall

      public abstract NewCall newWebSocketCall(Httpd client, Request request)
      Creates a new WebSocket call.
      Parameters:
      client - The HTTP client.
      request - The request.
      Returns:
      A new WebSocket call.
    • initExchange

      public abstract void initExchange(Response.Builder responseBuilder, Exchange exchange)
      Initializes the exchange for a Response.Builder.
      Parameters:
      responseBuilder - The response builder.
      exchange - The exchange.
    • exchange

      public abstract Exchange exchange(Response response)
      Returns the Exchange associated with a Response.
      Parameters:
      response - The response.
      Returns:
      The exchange.