Interface TransportBinding

All Known Subinterfaces:
PortTransportBinding

public interface TransportBinding
Transport binding owned by a logical WebServer listener.

A binding is responsible for one transport endpoint of a listener, such as a TCP server socket, a Unix domain socket, or another provider-defined transport. The listener owns shared request routing and shared lifecycle state; each binding owns transport-specific resources and active transport work.

  • Method Details

    • type

      String type()
      Transport binding type.

      This is the provider key used by TransportBindingFactoryProvider and by configuration under server.bindings.

      Returns:
      transport binding type
    • configuredEndpoint

      String configuredEndpoint()
      Configured endpoint summary for diagnostics.
      Returns:
      configured endpoint summary
    • holdsIdleConnectionPermit

      boolean holdsIdleConnectionPermit()
      Whether this binding holds one listener connection permit while waiting for an accepted connection.

      This is internal planning metadata. A binding must not hold more than one idle connection permit.

      Returns:
      whether the binding holds an idle connection permit
    • security

      Transport security applied by this binding.

      Bindings that return TransportBinding.Security.TLS must use listener TLS configuration, including listener virtual host TLS configuration when present. Bindings that are protected without listener TLS should return TransportBinding.Security.TLS_EQUIVALENT. Bindings that do not provide transport security should return TransportBinding.Security.UNPROTECTED.

      Returns:
      transport security
    • start

      void start()
      Start the binding.

      If startup fails after opening transport resources, the binding must still allow stop(Duration) to clean up any partially started state.

    • stop

      Stop accepting new work and shut down active transport work.

      Implementations must stop accepting new work and release transport resources before returning. Active work must either drain or be force-stopped within the graceful period.

      Parameters:
      gracefulPeriod - maximum graceful shutdown period
      Returns:
      shutdown result
    • suspend

      void suspend()
      Suspend the binding for checkpoint.
    • resume

      void resume()
      Resume the binding after restore.