Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for OnFailure (0.05 sec)

  1. 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)
  2. 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)
  3. okhttp-sse/api/okhttp-sse.api

    	public fun <init> ()V
    	public fun onClosed (Lokhttp3/sse/EventSource;)V
    	public fun onEvent (Lokhttp3/sse/EventSource;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    	public fun onFailure (Lokhttp3/sse/EventSource;Ljava/lang/Throwable;Lokhttp3/Response;)V
    	public fun onOpen (Lokhttp3/sse/EventSource;Lokhttp3/Response;)V
    }
    
    public final class okhttp3/sse/EventSources {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  4. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

      /**
       * Invoked when an event source has been closed due to an error reading from or writing to the
       * network. Incoming events may have been lost. No further calls to this listener will be made.
       */
      open fun onFailure(
        eventSource: EventSource,
        t: Throwable?,
        response: Response?,
      ) {
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

              } else {
                responseCallback.onFailure(this@RealCall, e)
              }
            } catch (t: Throwable) {
              cancel()
              if (!signalledCallback) {
                val canceledException = IOException("canceled due to $t")
                canceledException.initCause(t)
                responseCallback.onFailure(this@RealCall, canceledException)
              }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  6. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java

          }
    
          @Override
          public void onClosed(@NotNull EventSource eventSource) {
            future.completeExceptionally(new IllegalStateException("closed"));
          }
    
          @Override
          public void onFailure(@NotNull EventSource eventSource, @Nullable Throwable t, @Nullable Response response) {
            future.completeExceptionally(t == null ? new NullPointerException() : t);
          }
        });
        future.get();
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

        val call =
          client.newCall(
            Request
              .Builder()
              .url(server.url("/"))
              .build(),
          )
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: okio.IOException,
            ) {
              callFailure.complete(e)
            }
    
            override fun onResponse(
              call: Call,
              response: Response,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  8. docs/recipes.md

            val request = Request.Builder()
                .url("http://publicobject.com/helloworld.txt")
                .build()
    
            client.newCall(request).enqueue(object : Callback {
              override fun onFailure(call: Call, e: IOException) {
                e.printStackTrace()
              }
    
              override fun onResponse(call: Call, response: Response) {
                response.use {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/opensearch/client/SearchEngineClient.java

                        logger.debug(() -> "Refreshed " + stream(indices).get(stream -> stream.collect(Collectors.joining(", "))));
                    }
                }
    
                @Override
                public void onFailure(final Exception e) {
                    logger.error(() -> "Failed to refresh " + stream(indices).get(stream -> stream.collect(Collectors.joining(", "))), e);
                }
            });
    
        }
    
        /**
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sun Aug 31 08:19:00 UTC 2025
    - 121.9K bytes
    - Viewed (0)
Back to top