Interface OutgoingChannel

All Superinterfaces:
AutoCloseable, ChannelConnection

public interface OutgoingChannel extends ChannelConnection
Synchronous outgoing connector for one configured binding.

Each implementation defines and documents its external send-completion point. A send method must not return before that success point is reached. It must throw if sending failed or its outcome is indeterminate, preserving the underlying cause when one is available.

Generic outbound mapping uses the message entity and portable headers. A connector must never serialize or map local metadata. A connector-specific message subtype may expose separately documented native fields which its owning connector recognizes explicitly.

Runtime-invoked sends execute with the current delivery's Helidon context bound to the calling thread.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    send(Message<?> message)
    Send a message to the connector target.
    default void
    send(Object entity)
    Send a payload-only message.
    void
    Send a batch of messages to the connector target.
    void
    Establish transport resources for this binding.

    Methods inherited from interface ChannelConnection

    close, forceClose
    Modifier and Type
    Method
    Description
    void
    Close this binding after its delivery work has drained.
    void
    Force prompt shutdown without waiting for normal delivery settlement.
  • Method Details

    • start

      void start()
      Establish transport resources for this binding.

      A successful return means the connector is ready to send. Implementations must not create their own runtime delivery threads and must remain interruptible while starting.

      Throws:
      RuntimeException - if startup or readiness verification fails
    • send

      default void send(Object entity)
      Send a payload-only message.
      Parameters:
      entity - non-null payload
      Throws:
      NullPointerException - if entity is null
      RuntimeException - if sending fails or its outcome is indeterminate
    • send

      default void send(Message<?> message)
      Send a message to the connector target.
      Parameters:
      message - message
      Throws:
      RuntimeException - if sending fails or its outcome is indeterminate
    • sendBatch

      void sendBatch(MessageBatch<?> batch)
      Send a batch of messages to the connector target.
      Parameters:
      batch - immutable message batch
      Throws:
      BatchDeliveryException - if sending completes partially or its outcome is indeterminate