Interface InboundChannelHandlerFactory
-
@Experimental public interface InboundChannelHandlerFactoryCustom netty inbound handler factory in order to make custom changes on netty inbound data. Good example usage of this API is custom authentication. When the user is not authenticated then the instantiated channel handler can send back 401 to trigger negotiation. Since implementations are loaded with service loader it's discouraged to store any internal state in factories.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<org.apache.flink.shaded.netty4.io.netty.channel.ChannelHandler>createHandler(org.apache.flink.configuration.Configuration configuration, Map<String,String> responseHeaders)Creates new instance ofChannelHandlerintpriority()Gives back priority of theChannelHandler.
-
-
-
Method Detail
-
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, Map<String,String> responseHeaders) throws org.apache.flink.util.ConfigurationException
Creates new instance ofChannelHandler- Parameters:
configuration- The FlinkConfiguration.responseHeaders- The response headers.- Returns:
ChannelHandleror null if no custom handler need to be created.- Throws:
org.apache.flink.util.ConfigurationException- Thrown, if the handler configuration is incorrect.
-
-