Class ResponseInterceptorInjectionHandler

  • All Implemented Interfaces:
    LightHttpHandler, MiddlewareHandler, io.undertow.server.HttpHandler

    public class ResponseInterceptorInjectionHandler
    extends Object
    implements MiddlewareHandler
    This is a middleware handle that is responsible for injecting the SinkConduit in order to update the response content for interceptor handlers to update the response before returning to client.
    • Field Detail

      • ORIGINAL_ACCEPT_ENCODINGS_KEY

        public static final io.undertow.util.AttachmentKey<io.undertow.util.HeaderMap> ORIGINAL_ACCEPT_ENCODINGS_KEY
    • Constructor Detail

      • ResponseInterceptorInjectionHandler

        public ResponseInterceptorInjectionHandler()
                                            throws Exception
        Throws:
        Exception
      • ResponseInterceptorInjectionHandler

        @Deprecated
        public ResponseInterceptorInjectionHandler​(ResponseInjectionConfig cfg)
                                            throws Exception
        Deprecated.
        This is a constructor for test cases only. Please don't use it.
        Parameters:
        cfg - limit config
        Throws:
        Exception - thrown when config is wrong.
    • Method Detail

      • getNext

        public io.undertow.server.HttpHandler getNext()
        Description copied from interface: MiddlewareHandler
        Get the next handler in the chain
        Specified by:
        getNext in interface MiddlewareHandler
        Returns:
        HttpHandler
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: MiddlewareHandler
        Indicate if this handler is enabled or not.
        Specified by:
        isEnabled in interface MiddlewareHandler
        Returns:
        boolean true if enabled
      • reload

        public void reload()
        Description copied from interface: MiddlewareHandler
        Reload config values in case the config values changed by config server.
        Specified by:
        reload in interface MiddlewareHandler
      • handleRequest

        public void handleRequest​(io.undertow.server.HttpServerExchange exchange)
                           throws Exception
        Specified by:
        handleRequest in interface io.undertow.server.HttpHandler
        Parameters:
        exchange -
        Throws:
        Exception