Package com.sun.mail.util.logging
Class MailHandler.GetAndSetContext
- java.lang.Object
-
- com.sun.mail.util.logging.MailHandler.GetAndSetContext
-
- All Implemented Interfaces:
java.security.PrivilegedAction<java.lang.Object>
- Enclosing class:
- MailHandler
private static final class MailHandler.GetAndSetContext extends java.lang.Object implements java.security.PrivilegedAction<java.lang.Object>Performs a get and set of the context class loader with privileges enabled.- Since:
- JavaMail 1.4.6
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ObjectNOT_MODIFIEDA marker object used to signal that the class loader was not modified.private java.lang.ObjectsourceThe source containing the class loader.
-
Constructor Summary
Constructors Constructor Description GetAndSetContext(java.lang.Object source)Create the action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectrun()Gets the class loader from the source and sets the CCL only if the source and CCL are not the same.
-
-
-
Method Detail
-
run
public final java.lang.Object run()
Gets the class loader from the source and sets the CCL only if the source and CCL are not the same.- Specified by:
runin interfacejava.security.PrivilegedAction<java.lang.Object>- Returns:
- the replaced context class loader which can be null or NOT_MODIFIED to indicate that nothing was modified.
-
-