Interface OutboundChannelHandlerFactory


@Experimental public interface OutboundChannelHandlerFactory
Custom netty outbound handler factory in order to make custom changes on netty outbound data. Good example usage of this API is custom authentication. When the user wants to send authentication information then the instantiated channel handler can modify the HTTP request. Since implementations are loaded with service loader it's discouraged to store any internal state in factories.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler>
    createHandler(org.apache.flink.configuration.Configuration configuration)
    Creates new instance of ChannelHandler
    int
    Gives back priority of the ChannelHandler.
  • Method Details

    • priority

      int priority()
      Gives back priority of the ChannelHandler. The bigger the value is, the earlier it is executed. If multiple handlers have the same priority then the order is not defined.
      Returns:
      the priority of the ChannelHandler.
    • createHandler

      Optional<org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler> createHandler(org.apache.flink.configuration.Configuration configuration) throws org.apache.flink.util.ConfigurationException
      Creates new instance of ChannelHandler
      Parameters:
      configuration - The Flink Configuration.
      Returns:
      ChannelHandler or null if no custom handler needs to be created.
      Throws:
      org.apache.flink.util.ConfigurationException - Thrown, if the handler configuration is incorrect.