public SessionContext copy ( ) { SessionContext copy = new SessionContext ( ) ; copy . brownoutMode = brownoutMode ; copy . cancelled = cancelled ; copy . shouldStopFilterProcessing = shouldStopFilterProcessing ; copy . shouldSendErrorResponse = shouldSendErrorResponse ; copy . errorResponseSent = errorResponseSent ; copy . debugRouting = debugRouting ; copy . debugRequest = debugRequest ; copy . debugRequestHeadersOnly = debugRequestHeadersOnly ; copy . timings = timings ; Iterator < String > it = keySet ( ) . iterator ( ) ; String key = it . next ( ) ; while ( key != null ) { Object orig = get ( key ) ; try { Object copyValue = DeepCopy . copy ( orig ) ; if ( copyValue != null ) { copy . set ( key , copyValue ) ; } else { copy . set ( key , orig ) ; } } catch ( NotSerializableException e ) { copy . set ( key , orig ) ; } if ( it . hasNext ( ) ) { key = it . next ( ) ; } else { key = null ; } } return copy ; }
Makes a copy of the SessionContext . This is used for debugging .