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.Object
NOT_MODIFIED
A marker object used to signal that the class loader was not modified.private java.lang.Object
source
The 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.Object
run()
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:
run
in 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.
-
-