Package com.networknt.handler
Class ResponseInterceptorInjectionHandler
- java.lang.Object
-
- com.networknt.handler.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 Summary
Fields Modifier and Type Field Description static io.undertow.util.AttachmentKey<io.undertow.util.HeaderMap>ORIGINAL_ACCEPT_ENCODINGS_KEY-
Fields inherited from interface com.networknt.handler.LightHttpHandler
AUDIT_CONFIG_NAME, AUDIT_ON_ERROR, AUDIT_STACK_TRACE, auditConfig, auditOnError, auditStackTrace, CONFIG_NAME, ERROR_NOT_DEFINED, logger
-
-
Constructor Summary
Constructors Constructor Description ResponseInterceptorInjectionHandler()ResponseInterceptorInjectionHandler(ResponseInjectionConfig cfg)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.undertow.server.HttpHandlergetNext()Get the next handler in the chainvoidhandleRequest(io.undertow.server.HttpServerExchange exchange)booleanisEnabled()Indicate if this handler is enabled or not.voidregister()Register this handler to the handler registration.voidreload()Reload config values in case the config values changed by config server.MiddlewareHandlersetNext(io.undertow.server.HttpHandler next)Set the next handler in the chain-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.networknt.handler.LightHttpHandler
setExchangeStatus, setExchangeStatus, setExchangeStatus
-
Methods inherited from interface com.networknt.handler.MiddlewareHandler
addHandlerMDCContext
-
-
-
-
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:MiddlewareHandlerGet the next handler in the chain- Specified by:
getNextin interfaceMiddlewareHandler- Returns:
- HttpHandler
-
setNext
public MiddlewareHandler setNext(io.undertow.server.HttpHandler next)
Description copied from interface:MiddlewareHandlerSet the next handler in the chain- Specified by:
setNextin interfaceMiddlewareHandler- Parameters:
next- HttpHandler- Returns:
- MiddlewareHandler
-
isEnabled
public boolean isEnabled()
Description copied from interface:MiddlewareHandlerIndicate if this handler is enabled or not.- Specified by:
isEnabledin interfaceMiddlewareHandler- Returns:
- boolean true if enabled
-
register
public void register()
Description copied from interface:MiddlewareHandlerRegister this handler to the handler registration.- Specified by:
registerin interfaceMiddlewareHandler
-
reload
public void reload()
Description copied from interface:MiddlewareHandlerReload config values in case the config values changed by config server.- Specified by:
reloadin interfaceMiddlewareHandler
-
-