Interface IPrivilegedAction<T>
- Type Parameters:
T- The action return type.
- All Superinterfaces:
PrivilegedAction<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Extension to
This class is deprecated per Java 17, as the Java Security Manager is deprecated in that version. See https://openjdk.org/jeps/411 for details.
PrivilegedAction with an invokeSafe() method
that invokes the AccessController only if a security
manager is present.This class is deprecated per Java 17, as the Java Security Manager is deprecated in that version. See https://openjdk.org/jeps/411 for details.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic IPrivilegedAction<Void> static IPrivilegedAction<Void> authenticatorSetDefault(Authenticator aAuthenticator) static IPrivilegedAction<ClassLoader> classLoaderGetParent(ClassLoader aBaseClassLoader) static IPrivilegedAction<ClassLoader> getClassLoader(Class<?> aClass) static IPrivilegedAction<ClassLoader> static IPrivilegedAction<ClassLoader> default Tstatic <T> TinvokeSafe(IPrivilegedAction<T> aPA) static IPrivilegedAction<ProxySelector> static IPrivilegedAction<Void> proxySelectorSetDefault(ProxySelector aProxySelector) static IPrivilegedAction<Integer> securityAddProvider(Provider aProvider) static IPrivilegedAction<Provider> securityGetProvider(String sName) static IPrivilegedAction<Provider[]> static IPrivilegedAction<Provider[]> securityGetProviders(String sFilter) static IPrivilegedAction<Integer> securityInsertProviderAt(Provider aProvider, int nIndex) static IPrivilegedAction<Void> securityRemoveProvider(String sName) static IPrivilegedAction<Void> setContextClassLoader(ClassLoader aClassLoader) static IPrivilegedAction<String> systemClearProperty(String sKey) static IPrivilegedAction<Properties> static IPrivilegedAction<String> systemGetProperty(String sKey) static IPrivilegedAction<String> systemSetProperty(String sKey, String sValue) Methods inherited from interface java.security.PrivilegedAction
run
-
Method Details
-
invokeSafe
- Returns:
- The result of
PrivilegedAction.run()dependent if a system manager is installed or not.
-
invokeSafe
- Type Parameters:
T- The return type of the privileged action- Parameters:
aPA- The privileged action to run. May not benull.- Returns:
- The result of
PrivilegedAction.run()dependent if a system manager is installed or not. - Since:
- 9.4.7
-
asVoid
-
classLoaderGetParent
@Nonnull static IPrivilegedAction<ClassLoader> classLoaderGetParent(@Nonnull ClassLoader aBaseClassLoader) -
getClassLoader
-
getContextClassLoader
-
setContextClassLoader
-
getSystemClassLoader
-
systemClearProperty
-
systemGetProperty
-
systemGetProperties
-
systemSetProperty
-
proxySelectorGetDefault
-
proxySelectorSetDefault
@Nonnull static IPrivilegedAction<Void> proxySelectorSetDefault(@Nullable ProxySelector aProxySelector) -
authenticatorSetDefault
@Nonnull static IPrivilegedAction<Void> authenticatorSetDefault(@Nullable Authenticator aAuthenticator) -
securityGetProviders
-
securityGetProviders
-
securityGetProvider
-
securityAddProvider
-
securityInsertProviderAt
@Nonnull static IPrivilegedAction<Integer> securityInsertProviderAt(@Nonnull Provider aProvider, int nIndex) -
securityRemoveProvider
-