Class TcpTransportBindingFactory

java.lang.Object
io.helidon.webserver.TcpTransportBindingFactory
All Implemented Interfaces:
NamedService, TransportBindingFactory

public final class TcpTransportBindingFactory extends Object implements TransportBindingFactory
TCP transport binding factory.
  • Method Details

    • create

      public static TcpTransportBindingFactory create(TcpTransportConfig config)
      Create a TCP transport binding factory.
      Parameters:
      config - TCP transport binding configuration
      Returns:
      TCP transport binding factory
    • type

      public String type()
      Description copied from interface: NamedService
      Type of this implementation, to distinguish instances of same type, with different NamedService.name(). Use for example ConfiguredProvider.configKey() to define the type.
      Specified by:
      type in interface NamedService
      Returns:
      type of this service
    • enabled

      public boolean enabled()
      Description copied from interface: TransportBindingFactory
      Whether this binding factory is enabled.
      Specified by:
      enabled in interface TransportBindingFactory
      Returns:
      whether this binding factory is enabled
    • required

      public boolean required()
      Description copied from interface: TransportBindingFactory
      Whether this binding factory is required to become active.
      Specified by:
      required in interface TransportBindingFactory
      Returns:
      whether this binding factory is required
    • canBind

      public boolean canBind(BindingPlanContext context)
      Description copied from interface: TransportBindingFactory
      Whether this binding factory can bind with the current listener configuration.
      Specified by:
      canBind in interface TransportBindingFactory
      Parameters:
      context - listener binding planning view
      Returns:
      whether this binding factory can bind for the listener
    • create

      public TransportBinding create(TransportBindingContext context)
      Description copied from interface: TransportBindingFactory
      Create a binding for the transport.

      This method is called while the listener plans bindings, before listener capability validation has completed. Implementations must not bind sockets, allocate transport runtime resources, or start background work here. Resource allocation belongs to TransportBinding.start(); otherwise a later planning failure would have no lifecycle path to release those resources.

      Specified by:
      create in interface TransportBindingFactory
      Parameters:
      context - logical listener context
      Returns:
      created transport binding, never null