Interface Pipeline

All Superinterfaces:
InboundPropagator, OutboundPropagator
All Known Implementing Classes:
DefaultPipeline

public interface Pipeline extends InboundPropagator, OutboundPropagator
Represents an ordered chain of Handler instances associated with a Connection.

A Pipeline manages the flow of inbound and outbound events through the handler chain. Handlers can be dynamically added or removed, and events can be propagated through the pipeline.

See Also:
  • Method Details

    • addLast

      Pipeline addLast(String name, Handler handler)
      Appends a new Handler to the end of the pipeline.
      Parameters:
      name - a unique name used to identify the handler within the pipeline.
      handler - the Handler instance to add.
      Returns:
      this Pipeline instance for method chaining.
      Throws:
      IllegalArgumentException - if a handler with the specified name already exists.
    • getConnection

      Connection getConnection()
      Retrieves the Connection that this pipeline is bound to.
      Returns:
      the associated Connection instance.
    • remove

      Pipeline remove(String name)
      Removes the Handler with the specified name from the pipeline.
      Parameters:
      name - the unique name of the handler to remove.
      Returns:
      this Pipeline instance for method chaining.
      Throws:
      IllegalArgumentException - if no handler with the specified name exists in the pipeline.