AsynchronousChannelProvider.Provider 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.
Returns the system-wide default asynchronous channel provider for this invocation of the Java virtual machine.
[Android.Runtime.Register("provider", "()Ljava/nio/channels/spi/AsynchronousChannelProvider;", "", ApiSince=26)]
public static Java.Nio.Channels.Spi.AsynchronousChannelProvider? Provider ();
[<Android.Runtime.Register("provider", "()Ljava/nio/channels/spi/AsynchronousChannelProvider;", "", ApiSince=26)>]
static member Provider : unit -> Java.Nio.Channels.Spi.AsynchronousChannelProvider
Returns
The system-wide default AsynchronousChannel provider
- Attributes
Remarks
Returns the system-wide default asynchronous channel provider for this invocation of the Java virtual machine.
The first invocation of this method locates the default provider object as follows:
<ol>
<li>
If the system property java.nio.channels.spi.AsynchronousChannelProvider
is defined then it is taken to be the fully-qualified name of a concrete provider class. The class is loaded and instantiated; if this process fails then an unspecified error is thrown.
</li>
<li>
If a provider class has been installed in a jar file that is visible to the system class loader, and that jar file contains a provider-configuration file named java.nio.channels.spi.AsynchronousChannelProvider
in the resource directory META-INF/services
, then the first class name specified in that file is taken. The class is loaded and instantiated; if this process fails then an unspecified error is thrown.
</li>
<li>
Finally, if no provider has been specified by any of the above means then the system-default provider class is instantiated and the result is returned.
</li>
</ol>
Subsequent invocations of this method return the provider that was returned by the first invocation.
Java documentation for java.nio.channels.spi.AsynchronousChannelProvider.provider()
.
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.