class BindClientContextHandler extends ChannelInboundHandlerAdapter {

   @Override
   public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
      if(msg instanceof FullHttpRequest) {
         // TODO bind a lazy session that only parses the id on-demand
         logger.trace("Received HTTP request, determining context");
         try {
            String sessionId = extractSessionId((FullHttpRequest) msg);
            logger.debug("Extracted Session Id in BindClientContext: {}", sessionId);
            Client.bind(ctx.channel(), registry.load(sessionId));
            BridgeMdcUtil.bindHttpContext(registry, ctx.channel(), (FullHttpRequest) msg);
         }
         catch(Exception ex) {
            logger.warn("Exception while retrieving client session", ex);
            requestAuthorizer.handleFailedAuth(ctx, (FullHttpRequest) msg);
            return;
         }
      }

      super.channelRead(ctx, msg);
   }

   @Inject public  BindClientContextHandler(CookieConfig cookieConfig, ClientFactory registry, @Named("SessionAuthorizer") RequestAuthorizer requestAuthorizer);

}