Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for addCallback (0.3 sec)

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

        // TODO(cpovirk): Test forwarding more extensively.
      }
    
      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
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        // TODO(cpovirk): Test forwarding more extensively.
      }
    
      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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Futures.java

       * @since 10.0
       */
      public static <V extends @Nullable Object> void addCallback(
          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. */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

       *   <li>If an exception propagates out of a {@code Runnable}, it is not necessarily seen by any
       *       {@code UncaughtExceptionHandler} for the thread. For example, if the callback passed to
       *       {@link Futures#addCallback} throws an exception, that exception will be typically be
       *       logged by the {@link ListenableFuture} implementation, even if the thread is configured
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

              ListenableFuture<C> future, final Executor closingExecutor) {
        checkNotNull(closingExecutor);
        final ClosingFuture<C> closingFuture = new ClosingFuture<>(nonCancellationPropagating(future));
        Futures.addCallback(
            future,
            new FutureCallback<@Nullable Closeable>() {
              @Override
              public void onSuccess(@CheckForNull Closeable result) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
Back to top