class CorrelationHandler implements MiddlewareHandler {
    private static final Logger logger = LoggerFactory.getLogger(CorrelationHandler.class);
    private static final String CID = "cId";

    public static CorrelationConfig config;

    private volatile HttpHandler next;

    public CorrelationHandler() {
        config = CorrelationConfig.load();
        if(logger.isInfoEnabled()) logger.info("CorrelationHandler is loaded.");
    }

    @Override
    public void handleRequest(final HttpServerExchange exchange) throws Exception {<FILL_FUNCTION_BODY>}

    @Override
    public HttpHandler getNext() {
        return next;
    }

    @Override
    public MiddlewareHandler setNext(final HttpHandler next) {
        Handlers.handlerNotNull(next);
        this.next = next;
        return this;
    }

    @Override
    public boolean isEnabled() {
        return config.isEnabled();
    }

    @Override
    public void register() {
        ModuleRegistry.registerModule(CorrelationConfig.CONFIG_NAME, CorrelationHandler.class.getName(), Config.getNoneDecryptedInstance().getJsonMapConfigNoCache(CorrelationConfig.CONFIG_NAME), null);
    }

    @Override
    public void reload() {
        config.reload();
        ModuleRegistry.registerModule(CorrelationConfig.CONFIG_NAME, CorrelationHandler.class.getName(), Config.getNoneDecryptedInstance().getJsonMapConfigNoCache(CorrelationConfig.CONFIG_NAME), null);
        if(logger.isInfoEnabled()) {
            logger.info("CorrelationHandler is enabled.");
        }
    }
}

        if(logger.isDebugEnabled()) logger.debug("CorrelationHandler.handleRequest starts.");
        // check if the cid is in the request header
        String cId = exchange.getRequestHeaders().getFirst(HttpStringConstants.CORRELATION_ID);
        if(cId == null) {
        	// if not set, check the autogen flag and generate if set to true
        	if(config.isAutogenCorrelationID()) {
	            // generate a UUID and put it into the request header
	            cId = Util.getUUID();
	            exchange.getRequestHeaders().put(HttpStringConstants.CORRELATION_ID, cId);
	            String tId = exchange.getRequestHeaders().getFirst(HttpStringConstants.TRACEABILITY_ID);
	            if(tId != null && logger.isInfoEnabled()) {
	                logger.info("Associate traceability Id " + tId + " with correlation Id " + cId);
                }
        	}
        }
        // Add the cId into MDC so that all log statement will have cId as part of it.
        MDC.put(CID, cId);

        if (cId != null) {
            this.addHandlerMDCContext(exchange, CID, cId);
        }

        // This is usually the first handler in the request/response chain, log all the request headers here for diagnostic purpose.
        if(logger.isTraceEnabled()) {
            StringBuilder sb = new StringBuilder();
            for (HeaderValues header : exchange.getRequestHeaders()) {
                for (String value : header) {
                    sb.append(header.getHeaderName()).append("=").append(value).append("\n");
                }
            }
            logger.trace("Request Headers: " + sb);
        }

        if(logger.isDebugEnabled()) logger.debug("CorrelationHandler.handleRequest ends.");
        Handler.next(exchange, next);
    
<no_super_class>