Interface TransportBinding
- All Known Subinterfaces:
PortTransportBinding
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumTransport binding security.static enumTransport binding shutdown result. -
Method Summary
Modifier and TypeMethodDescriptionConfigured endpoint summary for diagnostics.booleanWhether this binding holds one listener connection permit while waiting for an accepted connection.voidresume()Resume the binding after restore.security()Transport security applied by this binding.voidstart()Start the binding.Stop accepting new work and shut down active transport work.voidsuspend()Suspend the binding for checkpoint.type()Transport binding type.
-
Method Details
-
type
String type()Transport binding type.This is the provider key used by
TransportBindingFactoryProviderand by configuration underserver.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
TransportBinding.Security security()Transport security applied by this binding.Bindings that return
TransportBinding.Security.TLSmust use listener TLS configuration, including listener virtual host TLS configuration when present. Bindings that are protected without listener TLS should returnTransportBinding.Security.TLS_EQUIVALENT. Bindings that do not provide transport security should returnTransportBinding.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.
-