public static void with ( HttpRequest request , Runnable runnable ) { HttpRequest existing = REQUEST . get ( ) ; boolean isSet = false ; try { if ( request != existing ) { isSet = true ; REQUEST . set ( request ) ; } runnable . run ( ) ; } finally { if ( isSet ) { REQUEST . remove ( ) ; } } }
Wrap the execution of the given runnable in request context processing .