Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 47 for EventListener (0.15 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

              }
              closeActiveExchange = false
              call.eventListener.followUpDecision(call, response, null)
              return response
            }
    
            val followUpBody = followUp.body
            if (followUpBody != null && followUpBody.isOneShot()) {
              closeActiveExchange = false
              call.eventListener.followUpDecision(call, response, null)
              return response
            }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  2. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
      private val eventListener = RecordingEventListener()
      private val listener = EventSourceRecorder()
      private var client =
        clientTestRule
          .newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(eventListener))
          .build()
    
      @AfterEach
      fun after() {
        listener.assertExhausted()
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun HttpUrl.canReuseConnectionFor(other: HttpUrl): Boolean =
      host == other.host &&
        port == other.port &&
        scheme == other.scheme
    
    internal fun EventListener.asFactory() = EventListener.Factory { this }
    
    /**
     * Reads until this is exhausted or the deadline has been reached. This is careful to not extend the
     * deadline if one exists already.
     */
    @Throws(IOException::class)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  4. docs/features/caching.md

              // $0.05 worth of phone storage in 2020
              maxSize = 50L * 1024L * 1024L // 50 MiB
          ))
          .build()
    ```
    
    ## EventListener events 
    
    Cache Events are exposed via the EventListener API.  Typical scenarios are below.
    
    ### Cache Hit
    
    In the ideal scenario the cache can fulfill the request without any conditional call to the network.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 02:19:09 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Authenticator.kt

     * [RFC 2817][1]. The HTTP CONNECT request that creates this tunnel connection is special: it
     * does not participate in any [interceptors][Interceptor] or [event listeners][EventListener]. It
     * doesn't include the motivating request's HTTP headers or even its full URL; only the target
     * server's hostname is sent to the proxy.
     *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        val networkRequest = strategy.networkRequest
        val cacheResponse = strategy.cacheResponse
    
        cache?.trackResponse(strategy)
        val listener = (call as? RealCall)?.eventListener ?: EventListener.NONE
    
        if (cacheCandidate != null && cacheResponse == null) {
          // The cache candidate wasn't applicable. Close it.
          cacheCandidate.body.closeQuietly()
        }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  7. okhttp/src/androidMain/baseline-prof.txt

    HSPLokhttp3/Dns;-><clinit>()V
    HSPLokhttp3/EventListener$Companion$NONE$1;-><init>()V
    HSPLokhttp3/EventListener;-><clinit>()V
    HSPLokhttp3/EventListener;-><init>()V
    HSPLokhttp3/EventListener;->callEnd(Lokhttp3/Call;)V
    HSPLokhttp3/EventListener;->callFailed(Lokhttp3/Call;Ljava/io/IOException;)V
    HSPLokhttp3/EventListener;->callStart(Lokhttp3/Call;)V
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Dec 30 23:28:56 UTC 2024
    - 127.9K bytes
    - Viewed (0)
  8. docs/changelogs/changelog_4x.md

            .sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
            .build()
        ```
    
     *  New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use
        these in logs, metrics, and even test cases to confirm your cache headers are configured as
        expected.
    
     *  New: Constant string `okhttp3.VERSION`. This is a string like "4.5.0-RC1", "4.5.0", or
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Apr 17 13:25:31 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

         * client.
         *
         * @see EventListener for semantics and restrictions on listener implementations.
         */
        fun eventListener(eventListener: EventListener) =
          apply {
            this.eventListenerFactory = eventListener.asFactory()
          }
    
        /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 51.7K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt

              }
          }
    
        client =
          client
            .newBuilder()
            .connectionSpecs(listOf(spec))
            .eventListenerFactory(
              clientTestRule.wrap(
                object : EventListener() {
                  override fun connectionAcquired(
                    call: Call,
                    connection: Connection,
                  ) {
                    val sslSocket = connection.socket() as SSLSocket
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6K bytes
    - Viewed (0)
Back to top