jni-android-sys 0.0.10

Autogenerated glue code for access Android JVM APIs from Rust
// WARNING:  This file was autogenerated by jni-bindgen.  Any changes to this file may be lost!!!


#[cfg(any(feature = "all", feature = "java-nio-channels-AsynchronousChannelGroup"))]
__jni_bindgen! {
    /// public class [AsynchronousChannelGroup](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html)
    ///
    /// Required feature: "java-nio-channels-AsynchronousChannelGroup"
    public class AsynchronousChannelGroup ("java/nio/channels/AsynchronousChannelGroup") extends crate::java::lang::Object {

        /// [provider](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#provider())
        ///
        /// Required features: "java-nio-channels-spi-AsynchronousChannelProvider"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-spi-AsynchronousChannelProvider")))]
        pub fn provider<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::spi::AsynchronousChannelProvider>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | FINAL, .name == "provider", .descriptor == "()Ljava/nio/channels/spi/AsynchronousChannelProvider;"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "provider\0", "()Ljava/nio/channels/spi/AsynchronousChannelProvider;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [withFixedThreadPool](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#withFixedThreadPool(int,%20java.util.concurrent.ThreadFactory))
        ///
        /// Required features: "java-nio-channels-AsynchronousChannelGroup", "java-util-concurrent-ThreadFactory"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-AsynchronousChannelGroup", feature = "java-util-concurrent-ThreadFactory")))]
        pub fn withFixedThreadPool<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: i32, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::ThreadFactory>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::AsynchronousChannelGroup>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | STATIC, .name == "withFixedThreadPool", .descriptor == "(ILjava/util/concurrent/ThreadFactory;)Ljava/nio/channels/AsynchronousChannelGroup;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/nio/channels/AsynchronousChannelGroup\0", "withFixedThreadPool\0", "(ILjava/util/concurrent/ThreadFactory;)Ljava/nio/channels/AsynchronousChannelGroup;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [withCachedThreadPool](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#withCachedThreadPool(java.util.concurrent.ExecutorService,%20int))
        ///
        /// Required features: "java-nio-channels-AsynchronousChannelGroup", "java-util-concurrent-ExecutorService"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-AsynchronousChannelGroup", feature = "java-util-concurrent-ExecutorService")))]
        pub fn withCachedThreadPool<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::ExecutorService>>, arg1: i32) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::AsynchronousChannelGroup>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | STATIC, .name == "withCachedThreadPool", .descriptor == "(Ljava/util/concurrent/ExecutorService;I)Ljava/nio/channels/AsynchronousChannelGroup;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __jni_bindgen::AsJValue::as_jvalue(&arg1)];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/nio/channels/AsynchronousChannelGroup\0", "withCachedThreadPool\0", "(Ljava/util/concurrent/ExecutorService;I)Ljava/nio/channels/AsynchronousChannelGroup;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [withThreadPool](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#withThreadPool(java.util.concurrent.ExecutorService))
        ///
        /// Required features: "java-nio-channels-AsynchronousChannelGroup", "java-util-concurrent-ExecutorService"
        #[cfg(any(feature = "all", all(feature = "java-nio-channels-AsynchronousChannelGroup", feature = "java-util-concurrent-ExecutorService")))]
        pub fn withThreadPool<'env>(__jni_env: &'env __jni_bindgen::Env, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::ExecutorService>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::AsynchronousChannelGroup>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | STATIC, .name == "withThreadPool", .descriptor == "(Ljava/util/concurrent/ExecutorService;)Ljava/nio/channels/AsynchronousChannelGroup;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into())];
                let (__jni_class, __jni_method) = __jni_env.require_class_static_method("java/nio/channels/AsynchronousChannelGroup\0", "withThreadPool\0", "(Ljava/util/concurrent/ExecutorService;)Ljava/nio/channels/AsynchronousChannelGroup;\0");
                __jni_env.call_static_object_method_a(__jni_class, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isShutdown](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#isShutdown())
        pub fn isShutdown<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | ABSTRACT, .name == "isShutdown", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "isShutdown\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [isTerminated](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#isTerminated())
        pub fn isTerminated<'env>(&'env self) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | ABSTRACT, .name == "isTerminated", .descriptor == "()Z"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "isTerminated\0", "()Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [shutdown](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#shutdown())
        pub fn shutdown<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | ABSTRACT, .name == "shutdown", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "shutdown\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [shutdownNow](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#shutdownNow())
        pub fn shutdownNow<'env>(&'env self) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | ABSTRACT, .name == "shutdownNow", .descriptor == "()V"
            unsafe {
                let __jni_args = [];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "shutdownNow\0", "()V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [awaitTermination](https://developer.android.com/reference/java/nio/channels/AsynchronousChannelGroup.html#awaitTermination(long,%20java.util.concurrent.TimeUnit))
        ///
        /// Required features: "java-util-concurrent-TimeUnit"
        #[cfg(any(feature = "all", all(feature = "java-util-concurrent-TimeUnit")))]
        pub fn awaitTermination<'env>(&'env self, arg0: i64, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::util::concurrent::TimeUnit>>) -> __jni_bindgen::std::result::Result<bool, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousChannelGroup", java.flags == PUBLIC | ABSTRACT, .name == "awaitTermination", .descriptor == "(JLjava/util/concurrent/TimeUnit;)Z"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0), __jni_bindgen::AsJValue::as_jvalue(&arg1.into())];
                let __jni_env = __jni_bindgen::Env::from_ptr(self.0.env);
                let (__jni_class, __jni_method) = __jni_env.require_class_method("java/nio/channels/AsynchronousChannelGroup\0", "awaitTermination\0", "(JLjava/util/concurrent/TimeUnit;)Z\0");
                __jni_env.call_boolean_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}