Example #1
0
        static IntPtr n_Submit_Ljava_util_concurrent_Callable_(IntPtr jnienv, IntPtr native__this, IntPtr native_task)
        {
            global::Com.Facebook.Common.Executors.IHandlerExecutorService __this = global::Java.Lang.Object.GetObject <global::Com.Facebook.Common.Executors.IHandlerExecutorService>(jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Java.Util.Concurrent.ICallable task = (global::Java.Util.Concurrent.ICallable)global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.ICallable>(native_task, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Submit(task));

            return(__ret);
        }
        static IntPtr n_NewTaskFor_Ljava_util_concurrent_Callable_(IntPtr jnienv, IntPtr native__this, IntPtr native_callable)
        {
            global::Com.Facebook.Common.Executors.HandlerExecutorServiceImpl __this = global::Java.Lang.Object.GetObject <global::Com.Facebook.Common.Executors.HandlerExecutorServiceImpl>(jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Java.Util.Concurrent.ICallable callable = (global::Java.Util.Concurrent.ICallable)global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.ICallable>(native_callable, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.NewTaskFor(callable));

            return(__ret);
        }
Example #3
0
        static IntPtr n_Schedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_(IntPtr jnienv, IntPtr native__this, IntPtr native_callable, long delay, IntPtr native_unit)
        {
            global::Com.Facebook.Common.Executors.IHandlerExecutorService __this = global::Java.Lang.Object.GetObject <global::Com.Facebook.Common.Executors.IHandlerExecutorService>(jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Java.Util.Concurrent.ICallable callable = (global::Java.Util.Concurrent.ICallable)global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.ICallable>(native_callable, JniHandleOwnership.DoNotTransfer);
            global::Java.Util.Concurrent.TimeUnit  unit     = global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.TimeUnit>(native_unit, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Schedule(callable, delay, unit));

            return(__ret);
        }
Example #4
0
        public unsafe global::Java.Util.Concurrent.IFuture Submit(global::Java.Util.Concurrent.ICallable task)
        {
            if (id_submit_Ljava_util_concurrent_Callable_ == IntPtr.Zero)
            {
                id_submit_Ljava_util_concurrent_Callable_ = JNIEnv.GetMethodID(class_ref, "submit", "(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;");
            }
            JValue *__args = stackalloc JValue[1];

            __args[0] = new JValue(task);
            global::Java.Util.Concurrent.IFuture __ret = global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.IFuture>(JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_submit_Ljava_util_concurrent_Callable_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
Example #5
0
        public unsafe global::Java.Util.Concurrent.IScheduledFuture Schedule(global::Java.Util.Concurrent.ICallable callable, long delay, global::Java.Util.Concurrent.TimeUnit unit)
        {
            if (id_schedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_ == IntPtr.Zero)
            {
                id_schedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_ = JNIEnv.GetMethodID(class_ref, "schedule", "(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;");
            }
            JValue *__args = stackalloc JValue[3];

            __args[0] = new JValue(callable);
            __args[1] = new JValue(delay);
            __args[2] = new JValue(unit);
            global::Java.Util.Concurrent.IScheduledFuture __ret = global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.IScheduledFuture>(JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_schedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_, __args), JniHandleOwnership.TransferLocalRef);
            return(__ret);
        }
        public virtual unsafe global::Java.Util.Concurrent.IScheduledFuture Submit(global::Java.Util.Concurrent.ICallable task)
        {
            const string __id = "submit.(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/ScheduledFuture;";

            try
            {
                JniArgumentValue *__args = stackalloc JniArgumentValue[1];
                __args[0] = new JniArgumentValue((task == null) ? IntPtr.Zero : ((global::Java.Lang.Object)task).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.IScheduledFuture>(__rm.Handle, JniHandleOwnership.TransferLocalRef));
            }
            finally
            {
            }
        }
        public virtual unsafe global::Java.Util.Concurrent.IScheduledFuture Schedule(global::Java.Util.Concurrent.ICallable callable, long delay, global::Java.Util.Concurrent.TimeUnit unit)
        {
            const string __id = "schedule.(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;";

            try
            {
                JniArgumentValue *__args = stackalloc JniArgumentValue[3];
                __args[0] = new JniArgumentValue((callable == null) ? IntPtr.Zero : ((global::Java.Lang.Object)callable).Handle);
                __args[1] = new JniArgumentValue(delay);
                __args[2] = new JniArgumentValue((unit == null) ? IntPtr.Zero : ((global::Java.Lang.Object)unit).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Java.Util.Concurrent.IScheduledFuture>(__rm.Handle, JniHandleOwnership.TransferLocalRef));
            }
            finally
            {
            }
        }
            public unsafe ModelRenderable.Builder SetSource(global::Android.Content.Context context, global::Java.Util.Concurrent.ICallable inputStreamCreator)
            {
                var rbuilder = this.JavaCast <Renderable.Builder>();

                rbuilder.SetSource(context, inputStreamCreator);

                return(this);
            }
        protected virtual unsafe global::Com.Facebook.Common.Executors.ScheduledFutureImpl NewTaskFor(global::Java.Util.Concurrent.ICallable callable)
        {
            const string __id = "newTaskFor.(Ljava/util/concurrent/Callable;)Lcom/facebook/common/executors/ScheduledFutureImpl;";

            try
            {
                JniArgumentValue *__args = stackalloc JniArgumentValue[1];
                __args[0] = new JniArgumentValue((callable == null) ? IntPtr.Zero : ((global::Java.Lang.Object)callable).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                return(global::Java.Lang.Object.GetObject <global::Com.Facebook.Common.Executors.ScheduledFutureImpl>(__rm.Handle, JniHandleOwnership.TransferLocalRef));
            }
            finally
            {
            }
        }
        public static unsafe global::Java.Lang.Object InvokeAtFrontUninterruptibly(global::Android.OS.Handler handler, global::Java.Util.Concurrent.ICallable callable)
        {
            const string __id = "invokeAtFrontUninterruptibly.(Landroid/os/Handler;Ljava/util/concurrent/Callable;)Ljava/lang/Object;";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((handler == null) ? IntPtr.Zero : ((global::Java.Lang.Object)handler).Handle);
                __args [1] = new JniArgumentValue((callable == null) ? IntPtr.Zero : ((global::Java.Lang.Object)callable).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return((Java.Lang.Object)global::Java.Lang.Object.GetObject <global::Java.Lang.Object> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
            }
        }