AccessController.DoPrivileged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DoPrivileged(IPrivilegedAction) |
Calls |
| DoPrivileged(IPrivilegedExceptionAction) |
Calls |
| DoPrivileged(IPrivilegedAction, AccessControlContext) |
Calls |
| DoPrivileged(IPrivilegedExceptionAction, AccessControlContext) |
Calls |
DoPrivileged(IPrivilegedAction)
Calls action.run().
[Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedAction;)Ljava/lang/Object;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Lang.Object? DoPrivileged(Java.Security.IPrivilegedAction? action);
[<Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedAction;)Ljava/lang/Object;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member DoPrivileged : Java.Security.IPrivilegedAction -> Java.Lang.Object
Parameters
- action
- IPrivilegedAction
the action to be performed.
Returns
the value returned by the action's run method.
- Attributes
Remarks
Calls action.run().
Java reference for java.security.AccessController.doPrivileged.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DoPrivileged(IPrivilegedExceptionAction)
Calls action.run().
[Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Lang.Object? DoPrivileged(Java.Security.IPrivilegedExceptionAction? action);
[<Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member DoPrivileged : Java.Security.IPrivilegedExceptionAction -> Java.Lang.Object
Parameters
- action
- IPrivilegedExceptionAction
the action to be performed
Returns
the value returned by the action's run method
- Attributes
Remarks
Calls action.run().
Java reference for java.security.AccessController.doPrivileged.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DoPrivileged(IPrivilegedAction, AccessControlContext)
Calls action.run().
[Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Lang.Object? DoPrivileged(Java.Security.IPrivilegedAction? action, Java.Security.AccessControlContext? context);
[<Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member DoPrivileged : Java.Security.IPrivilegedAction * Java.Security.AccessControlContext -> Java.Lang.Object
Parameters
- action
- IPrivilegedAction
the action to be performed.
- context
- AccessControlContext
an access control context representing the restriction to be applied to the caller's domain's privileges before performing the specified action. If the context is null, then no additional restriction is applied.
Returns
the value returned by the action's run method.
- Attributes
Remarks
Calls action.run().
Java reference for java.security.AccessController.doPrivileged.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DoPrivileged(IPrivilegedExceptionAction, AccessControlContext)
Calls action.run().
[Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static Java.Lang.Object? DoPrivileged(Java.Security.IPrivilegedExceptionAction? action, Java.Security.AccessControlContext? context);
[<Android.Runtime.Register("doPrivileged", "(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member DoPrivileged : Java.Security.IPrivilegedExceptionAction * Java.Security.AccessControlContext -> Java.Lang.Object
Parameters
- action
- IPrivilegedExceptionAction
the action to be performed
- context
- AccessControlContext
an access control context representing the restriction to be applied to the caller's domain's privileges before performing the specified action. If the context is null, then no additional restriction is applied.
Returns
the value returned by the action's run method
- Attributes
Remarks
Calls action.run().
Java reference for java.security.AccessController.doPrivileged.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.