Package org.bluezoo.gumdrop.http
This package provides a full-featured HTTP server supporting both HTTP/1.1 and HTTP/2 protocols, with automatic protocol negotiation via ALPN (Application-Layer Protocol Negotiation) for TLS connections.
Key Components
HTTPService- Abstract base for HTTP application services; owns listeners and provides the handler factory and authentication providerHTTPListener- TCP transport listener for HTTP/1.1 and HTTP/2 connectionsHTTPProtocolHandler- Handles a single HTTP session, supporting both HTTP/1.1 and HTTP/2Stream- Represents an HTTP/2 stream or HTTP/1.1 request/response pairHeaders- HTTP header collection
HTTP/2 Support
HTTP/2 features include:
- Binary framing with multiplexed streams
- HPACK header compression
- Server push
- Flow control per stream and connection
- Stream prioritization
HTTP/2 frame parsing and writing is handled by the
org.bluezoo.gumdrop.http.h2 package, which provides a zero-allocation,
callback-based API for frame handling.
Informational Responses (RFC 8297)
Handlers can send 1xx informational responses (e.g. 103 Early Hints)
before the final response via
HTTPResponseState.sendInformational(int, org.bluezoo.gumdrop.http.Headers).
This is supported for HTTP/1.1, HTTP/2, and HTTP/3 (via the h3 package).
HTTP/1.0 connections silently ignore informational responses.
Configuration Example
<http-server id="https" port="443">
<property name="keystore-file">/etc/gumdrop/keystore.p12</property>
<property name="keystore-password">secret</property>
<property name="handler">
<file-handler document-root="/var/www"/>
</property>
</http-server>
Subpackages
org.bluezoo.gumdrop.http.client- HTTP clientorg.bluezoo.gumdrop.webdav- Static file serving and WebDAVorg.bluezoo.gumdrop.http.h2- HTTP/2 frame parsing and writingorg.bluezoo.gumdrop.http.hpack- HPACK compressionorg.bluezoo.gumdrop.websocket- WebSocket support (separate package)
Telemetry
When telemetry is configured, the HTTP server provides:
- Distributed tracing with W3C Trace Context propagation
- Request/response metrics (latency, size, status codes)
- Connection and stream metrics
- Author:
- Chris Burdess
- See Also:
-
ClassDescriptionFallback to discover reasonable Content-Type for a resource.An
HTTPAuthenticationProviderthat delegates to aRealmfor credential verification.Default implementation ofHTTPRequestHandlerwith empty methods.An HTTP header name-value pair.A collection of HTTP headers with convenience methods for header access.Constants for HTTP authentication methods.Abstract base class for HTTP authentication providers.Authentication result containing outcome and principal information.HTTP status code reason phrases per RFC 9110 section 15.HTTP date formatter and parser per RFC 9110 section 5.6.7.TCP transport listener for HTTP/1.1 and HTTP/2 connections.APrincipalrepresenting an authenticated HTTP user.HTTP/1.1 and HTTP/2 protocol handler usingProtocolHandlerandLineParser.Handler for HTTP request events on a single stream.Factory for creatingHTTPRequestHandlerinstances.State interface for sending an HTTP response.OpenTelemetry metrics for HTTP servers.Abstract base for HTTP application services.Symbolic enumeration of HTTP status codes per RFC 9110 section 15.Enum of possible HTTP versions.Deprecated.Stream priority signaling is deprecated per RFC 9113 section 5.3.Deprecated.Stream priority signaling is deprecated per RFC 9113 section 5.3.Priority node representing a stream in the dependency tree.