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 TypeMethodDescriptionOptional<org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler>createHandler(org.apache.flink.configuration.Configuration configuration) Creates new instance ofChannelHandlerintpriority()Gives back priority of theChannelHandler.
-
Method Details
-
priority
int priority()Gives back priority of theChannelHandler. 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 ofChannelHandler- Parameters:
configuration- The FlinkConfiguration.- Returns:
ChannelHandleror null if no custom handler needs to be created.- Throws:
org.apache.flink.util.ConfigurationException- Thrown, if the handler configuration is incorrect.
-