- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 48 for OnFailure (0.22 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt
} internal fun processResponse(response: Response) { response.use { if (!response.isSuccessful) { listener.onFailure(this, null, response) return } val body = response.body if (!body.isEventStream()) { listener.onFailure( this, IllegalStateException("Invalid content-type: ${body.contentType()}"), response, )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 3.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
@Override public void onSuccess(String result) { fail("Was not expecting onSuccess() to be called."); } @Override public void onFailure(Throwable t) { synchronized (monitor) { assertFalse(called); assertThat(t).isInstanceOf(CancellationException.class); called = true; } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 6.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/AutobahnTester.kt
webSocket: WebSocket, code: Int, reason: String, ) { webSocket.close(1000, null) latch.countDown() } override fun onFailure( webSocket: WebSocket, t: Throwable, response: Response?, ) { t.printStackTrace(System.out) latch.countDown() } }, )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java
@Override public void onSuccess(String result) { fail("Was not expecting onSuccess() to be called."); } @Override public void onFailure(Throwable t) { synchronized (monitor) { assertFalse(called); assertThat(t).isInstanceOf(CancellationException.class); called = true; } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 6.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketRecorder.kt
events.add(Closed(code, reason)) } } override fun onFailure( webSocket: WebSocket, t: Throwable, response: Response?, ) { Platform.get().log("[WS $name] onFailure", Platform.INFO, t) val delegate = delegate if (delegate != null) { this.delegate = null delegate.onFailure(webSocket, t, response) } else { events.add(Failure(t, response)) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 6.8K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
get().log("[ES] onClosed", Platform.INFO, null) events.add(Closed) drainCancelQueue(eventSource) } override fun onFailure( eventSource: EventSource, t: Throwable?, response: Response?, ) { get().log("[ES] onFailure", Platform.INFO, t) events.add(Failure(t, response, t?.message ?: response?.body?.string())) drainCancelQueue(eventSource) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:32:52 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
val exceptionRef = AtomicReference<Throwable>() val call = client.newCall(request) call.timeout().timeout(250, TimeUnit.MILLISECONDS) call.enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { exceptionRef.set(e) latch.countDown() } @Throws(IOException::class) override fun onResponse(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherCleanupTest.kt
class DispatcherCleanupTest { @StartStop private val server = MockWebServer() @Test fun testFinish() { val okhttp = OkHttpClient() val callback = object : Callback { override fun onFailure( call: Call, e: IOException, ) {} override fun onResponse( call: Call, response: Response, ) { response.close() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 1.3K bytes - Viewed (0) -
okhttp-coroutines/src/main/kotlin/okhttp3/coroutines/ExecuteAsync.kt
suspend fun Call.executeAsync(): Response = suspendCancellableCoroutine { continuation -> continuation.invokeOnCancellation { this.cancel() } this.enqueue( object : Callback { override fun onFailure( call: Call, e: IOException, ) { continuation.resumeWithException(e) } override fun onResponse( call: Call, response: Response,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 04:20:30 UTC 2025 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
} @Override public void onClosing(WebSocket webSocket, int code, String reason) { webSocket.close(1000, null); System.out.println("CLOSE: " + code + " " + reason); } @Override public void onFailure(WebSocket webSocket, Throwable t, Response response) { t.printStackTrace(); } public static void main(String... args) { new WebSocketEcho().run(); }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Apr 04 11:40:21 UTC 2024 - 1.6K bytes - Viewed (0)