Package org.bluezoo.gumdrop.http


package org.bluezoo.gumdrop.http
HTTP/1.1 and HTTP/2 server implementation.

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 provider
  • HTTPListener - TCP transport listener for HTTP/1.1 and HTTP/2 connections
  • HTTPProtocolHandler - Handles a single HTTP session, supporting both HTTP/1.1 and HTTP/2
  • Stream - Represents an HTTP/2 stream or HTTP/1.1 request/response pair
  • Headers - 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

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: