All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.signal.libsignal.net.TokioAsyncContext Maven / Gradle / Ivy

There is a newer version: 0.62.0
Show newest version
//
// Copyright 2024 Signal Messenger, LLC.
// SPDX-License-Identifier: AGPL-3.0-only
//

package org.signal.libsignal.net;

import org.signal.libsignal.internal.CompletableFuture;
import org.signal.libsignal.internal.Native;
import org.signal.libsignal.internal.NativeHandleGuard;

class TokioAsyncContext extends NativeHandleGuard.SimpleOwner {
  TokioAsyncContext() {
    super(Native.TokioAsyncContext_new());
  }

  @SuppressWarnings("unchecked")
  CompletableFuture> loadClassAsync(String className) {
    return (CompletableFuture>) Native.AsyncLoadClass(this, className);
  }

  @Override
  protected void release(final long nativeHandle) {
    Native.TokioAsyncContext_Destroy(nativeHandle);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy