Class DBusHandlerConfiguration

java.lang.Object
com.lucimber.dbus.netty.DBusHandlerConfiguration

public final class DBusHandlerConfiguration extends Object
Centralized configuration for D-Bus pipeline handlers. This class maintains the definitive order and creation logic for all handlers, ensuring perfect synchronization between initial setup and reconnection scenarios.
  • Method Details

    • initializePipeline

      public static void initializePipeline(io.netty.channel.ChannelPipeline pipeline, io.netty.util.concurrent.Promise<Void> connectPromise, RealityCheckpoint appLogicHandler)
      Initializes the complete pipeline in the correct order.
      Parameters:
      pipeline - the channel pipeline to configure
      connectPromise - the promise to complete when connection is established
      appLogicHandler - the application logic handler
    • getSaslHandlers

      public static Map<String,Supplier<io.netty.channel.ChannelHandler>> getSaslHandlers()
      Gets the ordered list of SASL handler names that need to be re-added during reconnection.
      Returns:
      ordered map of SASL handler names to their creation suppliers
    • getHandlerOrder

      public static String[] getHandlerOrder()
      Gets the ordered list of all handler names in the pipeline.
      Returns:
      ordered list of handler names
    • findFirstDbusHandler

      public static String findFirstDbusHandler(io.netty.channel.ChannelPipeline pipeline)
      Finds the first existing D-Bus handler in the pipeline to use as an insertion point.
      Parameters:
      pipeline - the channel pipeline to search
      Returns:
      the name of the first D-Bus handler found, or null if none found