Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for onSuccess (0.16 sec)

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

        FutureCallback<String> callback =
            new FutureCallback<String>() {
              private boolean called = false;
    
              @Override
              public void onSuccess(String result) {
                fail("Was not expecting onSuccess() to be called.");
              }
    
              @Override
              public synchronized void onFailure(Throwable t) {
                assertFalse(called);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K 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. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java

                (resolve, reject) -> {
                  Futures.addCallback(
                      this,
                      new FutureCallback<V>() {
                        @Override
                        public void onSuccess(V value) {
                          resolve.onInvoke(value);
                        }
    
                        @Override
                        public void onFailure(Throwable throwable) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 24 18:27:19 GMT 2023
    - 3.9K bytes
    - Viewed (1)
  4. 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)
  5. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

        FutureCallback<String> callback =
            new FutureCallback<String>() {
              private boolean called = false;
    
              @Override
              public void onSuccess(String result) {
                fail("Was not expecting onSuccess() to be called.");
              }
    
              @Override
              public synchronized void onFailure(Throwable t) {
                assertFalse(called);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * 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);
       *       }
       *     }, executor);
       * }</pre>
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
  7. 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)
  8. 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