public Subject replaceCallerSubject ( Subject callerSubject ) { SubjectThreadContext subjectThreadContext = getSubjectThreadContext ( ) ; Subject replacedCallerSubject = subjectThreadContext . getCallerSubject ( ) ; subjectThreadContext . setCallerSubject ( callerSubject ) ; return replacedCallerSubject ; }
Replaces the caller subject on the thread and returns the replaced subject .