Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for FutureCallback (0.15 sec)

  1. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        addCallback(f, callback, directExecutor());
        f.setException(e);
      }
    
      public void testCancel() {
        SettableFuture<String> f = SettableFuture.create();
        FutureCallback<String> callback =
            new FutureCallback<String>() {
              private final Object monitor = new Object();
              private boolean called = false;
    
              @Override
              public void onSuccess(String result) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. regression-test/src/androidTest/java/okhttp/regression/compare/ApacheHttpClientHttp2Test.kt

    import org.apache.hc.client5.http.async.methods.SimpleHttpRequests
    import org.apache.hc.client5.http.async.methods.SimpleHttpResponse
    import org.apache.hc.client5.http.impl.async.HttpAsyncClients
    import org.apache.hc.core5.concurrent.FutureCallback
    import org.apache.hc.core5.http.ProtocolVersion
    import org.junit.Assert
    import org.junit.Test
    
    /**
     * Simplified from
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

      }
    
      public void testAddCallback() {
        FluentFuture<String> f = FluentFuture.from(immediateFuture("a"));
        final boolean[] called = new boolean[1];
        f.addCallback(
            new FutureCallback<String>() {
              @Override
              public void onSuccess(String result) {
                called[0] = true;
              }
    
              @Override
              public void onFailure(Throwable t) {}
            },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/Futures.java

          final ListenableFuture<V> future,
          final FutureCallback<? super V> callback,
          Executor executor) {
        Preconditions.checkNotNull(callback);
        future.addListener(new CallbackListener<V>(future, callback), executor);
      }
    
      /** See {@link #addCallback(ListenableFuture, FutureCallback, Executor)} for behavioral notes. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/FluentFuture.java

       * callbacks, but any callback added through this method is guaranteed to be called once the
       * computation is complete.
       *
       * <p>Example:
       *
       * <pre>{@code
       * future.addCallback(
       *     new FutureCallback<QueryResult>() {
       *       public void onSuccess(QueryResult result) {
       *         storeInCache(result);
       *       }
       *       public void onFailure(Throwable t) {
       *         reportError(t);
       *       }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/Futures.java

          final ListenableFuture<V> future,
          final FutureCallback<? super V> callback,
          Executor executor) {
        Preconditions.checkNotNull(callback);
        future.addListener(new CallbackListener<V>(future, callback), executor);
      }
    
      /** See {@link #addCallback(ListenableFuture, FutureCallback, Executor)} for behavioral notes. */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

        checkNotNull(closingExecutor);
        final ClosingFuture<C> closingFuture = new ClosingFuture<>(nonCancellationPropagating(future));
        Futures.addCallback(
            future,
            new FutureCallback<@Nullable AutoCloseable>() {
              @Override
              public void onSuccess(@CheckForNull AutoCloseable result) {
                closingFuture.closeables.closer.eventuallyClose(result, closingExecutor);
              }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 08 19:36:35 UTC 2024
    - 98.5K bytes
    - Viewed (0)
Back to top