java.lang.Object
org.miaixz.bus.http.metric.Internal
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddLenient(Headers.Builder builder, String line) Adds a lenient header line to theHeaders.Builder.abstract voidaddLenient(Headers.Builder builder, String name, String value) Adds a lenient header name and value to theHeaders.Builder.abstract voidapply(ConnectionSuite tlsConfiguration, SSLSocket sslSocket, boolean isFallback) Applies the givenConnectionSuiteto theSSLSocket.abstract intcode(Response.Builder responseBuilder) Returns the HTTP status code from aResponse.Builder.abstract booleanequalsNonHost(Address a, Address b) Checks if twoAddressinstances are equal, ignoring the host.abstract Exchangeabstract voidinitExchange(Response.Builder responseBuilder, Exchange exchange) Initializes the exchange for aResponse.Builder.abstract NewCallnewWebSocketCall(Httpd client, Request request) Creates a new WebSocket call.abstract RealConnectionPoolrealConnectionPool(ConnectionPool connectionPool) Returns the real connection pool from the given connection pool.
-
Field Details
-
instance
The singleton instance of this internal API.
-
-
Constructor Details
-
Internal
public Internal()
-
-
Method Details
-
addLenient
Adds a lenient header line to theHeaders.Builder.- Parameters:
builder- The headers builder.line- The header line to add.
-
addLenient
Adds a lenient header name and value to theHeaders.Builder.- Parameters:
builder- The headers builder.name- The header name.value- The header value.
-
realConnectionPool
Returns the real connection pool from the given connection pool.- Parameters:
connectionPool- The connection pool.- Returns:
- The real connection pool.
-
equalsNonHost
Checks if twoAddressinstances are equal, ignoring the host.- Parameters:
a- The first address.b- The second address.- Returns:
trueif the non-host parts of the addresses are equal.
-
code
Returns the HTTP status code from aResponse.Builder.- Parameters:
responseBuilder- The response builder.- Returns:
- The HTTP status code.
-
apply
public abstract void apply(ConnectionSuite tlsConfiguration, SSLSocket sslSocket, boolean isFallback) Applies the givenConnectionSuiteto theSSLSocket.- Parameters:
tlsConfiguration- The TLS configuration to apply.sslSocket- The SSL socket.isFallback- Whether this is a fallback connection.
-
newWebSocketCall
Creates a new WebSocket call.- Parameters:
client- The HTTP client.request- The request.- Returns:
- A new WebSocket call.
-
initExchange
Initializes the exchange for aResponse.Builder.- Parameters:
responseBuilder- The response builder.exchange- The exchange.
-
exchange
- Parameters:
response- The response.- Returns:
- The exchange.
-