Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for onSuccess (0.28 sec)

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

        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) {}
            },
            directExecutor());
        assertThat(called[0]).isTrue();
      }
    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

        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) {}
            },
            directExecutor());
        assertThat(called[0]).isTrue();
      }
    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

       * <p>Example:
       *
       * <pre>{@code
       * ListenableFuture<QueryResult> future = ...;
       * Executor e = ...
       * addCallback(future,
       *     new FutureCallback<QueryResult>() {
       *       public void onSuccess(QueryResult result) {
       *         storeInCache(result);
       *       }
       *       public void onFailure(Throwable t) {
       *         reportError(t);
       *       }
       *     }, e);
       * }</pre>
       *
    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/ClosingFuture.java

        Futures.addCallback(
            future,
            new FutureCallback<@Nullable Closeable>() {
              @Override
              public void onSuccess(@CheckForNull Closeable result) {
                closingFuture.closeables.closer.eventuallyClose(result, closingExecutor);
              }
    
              @Override
              public void onFailure(Throwable t) {}
            },
    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