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-AsynchronousServerSocketChannel"))]
__jni_bindgen! {
    /// public class [AsynchronousServerSocketChannel](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html)
    ///
    /// Required feature: "java-nio-channels-AsynchronousServerSocketChannel"
    public class AsynchronousServerSocketChannel ("java/nio/channels/AsynchronousServerSocketChannel") extends crate::java::lang::Object, implements crate::java::nio::channels::AsynchronousChannel, crate::java::nio::channels::NetworkChannel {

        /// [provider](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.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/AsynchronousServerSocketChannel", 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/AsynchronousServerSocketChannel\0", "provider\0", "()Ljava/nio/channels/spi/AsynchronousChannelProvider;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

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

        /// [bind](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html#bind(java.net.SocketAddress))
        ///
        /// Required features: "java-net-SocketAddress", "java-nio-channels-AsynchronousServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress", feature = "java-nio-channels-AsynchronousServerSocketChannel")))]
        pub fn bind_SocketAddress<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketAddress>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::AsynchronousServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousServerSocketChannel", java.flags == PUBLIC | FINAL, .name == "bind", .descriptor == "(Ljava/net/SocketAddress;)Ljava/nio/channels/AsynchronousServerSocketChannel;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.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/AsynchronousServerSocketChannel\0", "bind\0", "(Ljava/net/SocketAddress;)Ljava/nio/channels/AsynchronousServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

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

        /// [setOption](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html#setOption(java.net.SocketOption,%20java.lang.Object))
        ///
        /// Required features: "java-lang-Object", "java-net-SocketOption", "java-nio-channels-AsynchronousServerSocketChannel"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-net-SocketOption", feature = "java-nio-channels-AsynchronousServerSocketChannel")))]
        pub fn setOption_SocketOption_Object<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::net::SocketOption>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::nio::channels::AsynchronousServerSocketChannel>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "setOption", .descriptor == "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/nio/channels/AsynchronousServerSocketChannel;"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __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/AsynchronousServerSocketChannel\0", "setOption\0", "(Ljava/net/SocketOption;Ljava/lang/Object;)Ljava/nio/channels/AsynchronousServerSocketChannel;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [accept](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html#accept(java.lang.Object,%20java.nio.channels.CompletionHandler))
        ///
        /// Required features: "java-lang-Object", "java-nio-channels-CompletionHandler"
        #[cfg(any(feature = "all", all(feature = "java-lang-Object", feature = "java-nio-channels-CompletionHandler")))]
        pub fn accept_Object_CompletionHandler<'env>(&'env self, arg0: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::lang::Object>>, arg1: impl __jni_bindgen::std::convert::Into<__jni_bindgen::std::option::Option<&'env crate::java::nio::channels::CompletionHandler>>) -> __jni_bindgen::std::result::Result<(), __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "accept", .descriptor == "(Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V"
            unsafe {
                let __jni_args = [__jni_bindgen::AsJValue::as_jvalue(&arg0.into()), __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/AsynchronousServerSocketChannel\0", "accept\0", "(Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V\0");
                __jni_env.call_void_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [accept](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html#accept())
        ///
        /// Required features: "java-util-concurrent-Future"
        #[cfg(any(feature = "all", all(feature = "java-util-concurrent-Future")))]
        pub fn accept<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::util::concurrent::Future>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "accept", .descriptor == "()Ljava/util/concurrent/Future;"
            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/AsynchronousServerSocketChannel\0", "accept\0", "()Ljava/util/concurrent/Future;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }

        /// [getLocalAddress](https://developer.android.com/reference/java/nio/channels/AsynchronousServerSocketChannel.html#getLocalAddress())
        ///
        /// Required features: "java-net-SocketAddress"
        #[cfg(any(feature = "all", all(feature = "java-net-SocketAddress")))]
        pub fn getLocalAddress<'env>(&'env self) -> __jni_bindgen::std::result::Result<__jni_bindgen::std::option::Option<__jni_bindgen::Local<'env, crate::java::net::SocketAddress>>, __jni_bindgen::Local<'env, crate::java::lang::Throwable>> {
            // class.path == "java/nio/channels/AsynchronousServerSocketChannel", java.flags == PUBLIC | ABSTRACT, .name == "getLocalAddress", .descriptor == "()Ljava/net/SocketAddress;"
            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/AsynchronousServerSocketChannel\0", "getLocalAddress\0", "()Ljava/net/SocketAddress;\0");
                __jni_env.call_object_method_a(self.0.object, __jni_method, __jni_args.as_ptr())
            }
        }
    }
}