Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 54 for OnFailure (0.05 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/SocketChannelTest.kt

            .url(url)
            .build()
    
        val promise = CompletableFuture<Response>()
    
        val call = client.newCall(request)
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              promise.completeExceptionally(e)
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 8K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_3x.md

        would never call back if it crashed with an unchecked throwable, such as a
        `NullPointerException` or `OutOfMemoryError`. We now call `Callback.onFailure()` with an
        `IOException` that reports the call as canceled. The triggering exception is still delivered to
        the thread's `UncaughtExceptionHandler`.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 14:55:54 UTC 2022
    - 50.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Futures.java

            if (failure != null) {
              callback.onFailure(failure);
              return;
            }
          }
          V value;
          try {
            value = getDone(future);
          } catch (ExecutionException e) {
            callback.onFailure(e.getCause());
            return;
          } catch (Throwable e) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 64.3K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

        failures: MutableList<Exception>,
      ) {
        val latch = CountDownLatch(networkRequests.size)
    
        for (call in networkRequests) {
          call.enqueue(
            object : Callback {
              override fun onFailure(
                call: Call,
                e: IOException,
              ) {
                synchronized(failures) {
                  failures.add(e)
                }
                latch.countDown()
              }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

            override fun clone(): Call = TODO()
          }
      }
    
      @Test
      fun callback() {
        val callback =
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) = TODO()
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) = TODO()
          }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

     *   public void onResponse(Call call, Response response) throws IOException {
     *     try (ResponseBody responseBody = response.body()) {
     *     ... // Use the response.
     *     }
     *   }
     *
     *   public void onFailure(Call call, IOException e) {
     *   ... // Handle the failure.
     *   }
     * });
     * ```
     *
     * These examples will not work if you're consuming the response body on another thread. In such
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

              .Builder()
              .url(server.url("/"))
              .build(),
          )
        val completionLatch = CountDownLatch(1)
        val callback: Callback =
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              completionLatch.countDown()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_2x.md

        the client.
    
     *  **WebSocketListener has incompatible changes.** The `onOpen()` method is now
        called on the reader thread, so implementations must return before further
        websocket messages will be delivered. The `onFailure()` method now includes
        an HTTP response if one was returned.
    
    ## Version 2.4.0-RC1
    
    _2015-05-16_
    
     *  **New HttpUrl API.** It's like `java.net.URL` but good. Note that
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 26.6K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

                throw AssertionError(e)
              }
              assert200Http2Response(response, "san.com")
              connection.get()!!.socket().close()
              latch4.countDown()
            }
    
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              fail("")
            }
          },
        )
        val client2 =
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

        requestCanceledLatch: CountDownLatch?,
      ) {
        val call = client.newCall(Request(server.url("/")))
        val latch = CountDownLatch(1)
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              latch.countDown()
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
Back to top