Policy.GetInstance 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 |
|---|---|
| GetInstance(String, Policy+IParameters) | |
| GetInstance(String, Policy+IParameters, Provider) | |
| GetInstance(String, Policy+IParameters, String) |
GetInstance(String, Policy+IParameters)
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;)Ljava/security/Policy;", "")]
public static Java.Security.Policy? GetInstance(string? type, Java.Security.Policy.IParameters? params);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;)Ljava/security/Policy;", "")>]
static member GetInstance : string * Java.Security.Policy.IParameters -> Java.Security.Policy
Parameters
- type
- String
the specified Policy type. See the Policy section in the Java Security Standard Algorithm Names Specification for a list of standard Policy types.
- params
- Policy.IParameters
parameters for the Policy, which may be null.
Returns
the new Policy object
- Attributes
Exceptions
Remarks
Returns a Policy object of the specified type. This method traverses the list of registered security providers, starting with the most preferred provider. A new Policy object encapsulating the PolicySpi implementation from the first provider that supports the specified type is returned. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
Java reference for java.security.Policy.getInstance.
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
GetInstance(String, Policy+IParameters, Provider)
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;Ljava/security/Provider;)Ljava/security/Policy;", "")]
public static Java.Security.Policy? GetInstance(string? type, Java.Security.Policy.IParameters? params, Java.Security.Provider? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;Ljava/security/Provider;)Ljava/security/Policy;", "")>]
static member GetInstance : string * Java.Security.Policy.IParameters * Java.Security.Provider -> Java.Security.Policy
Parameters
- type
- String
the specified Policy type. See the Policy section in the Java Security Standard Algorithm Names Specification for a list of standard Policy types.
- params
- Policy.IParameters
parameters for the Policy, which may be null.
- provider
- Provider
the Provider.
Returns
the new Policy object
- Attributes
Exceptions
Remarks
Returns a Policy object of the specified type. A new Policy object encapsulating the PolicySpi implementation from the specified provider is returned. Note that the specified provider does not have to be registered in the provider list.
Java reference for java.security.Policy.getInstance.
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
GetInstance(String, Policy+IParameters, String)
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;Ljava/lang/String;)Ljava/security/Policy;", "")]
public static Java.Security.Policy? GetInstance(string? type, Java.Security.Policy.IParameters? params, string? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Policy$Parameters;Ljava/lang/String;)Ljava/security/Policy;", "")>]
static member GetInstance : string * Java.Security.Policy.IParameters * string -> Java.Security.Policy
Parameters
- type
- String
the specified Policy type. See the Policy section in the Java Security Standard Algorithm Names Specification for a list of standard Policy types.
- params
- Policy.IParameters
parameters for the Policy, which may be null.
- provider
- String
the provider.
Returns
the new Policy object
- Attributes
Exceptions
Remarks
Returns a Policy object of the specified type. A new Policy object encapsulating the PolicySpi implementation from the specified provider is returned. The specified provider must be registered in the provider list. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
Java reference for java.security.Policy.getInstance.
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.