Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for eventListener (0.38 seconds)

  1. docs/features/events.md

    0001 0.624 connectionReleased
    0001 0.624 callEnd
    ```
    
    The `EventListener.Factory` also makes it possible to limit metrics to a subset of calls. This one captures metrics on a random 10%:
    
    ```java
    class MetricsEventListener extends EventListener {
      private static final Factory FACTORY = new Factory() {
        @Override public EventListener create(Call call) {
          if (Math.random() < 0.10) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 7.7K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

              ioe: IOException,
            ) = TODO()
    
            override fun canceled(call: Call) = TODO()
          }
        val none: EventListener = EventListener.NONE
      }
    
      @Test
      fun eventListenerBuilder() {
        var builder: EventListener.Factory = EventListener.Factory { TODO() }
      }
    
      @Test
      fun formBody() {
        val formBody: FormBody = FormBody.Builder().build()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 49.7K bytes
    - Click Count (0)
  3. okhttp/api/jvm/okhttp.api

    	public abstract fun lookup (Ljava/lang/String;)Ljava/util/List;
    }
    
    public final class okhttp3/Dns$Companion {
    }
    
    public abstract class okhttp3/EventListener {
    	public static final field Companion Lokhttp3/EventListener$Companion;
    	public static final field NONE Lokhttp3/EventListener;
    	public fun <init> ()V
    	public fun cacheConditionalHit (Lokhttp3/Call;Lokhttp3/Response;)V
    	public fun cacheHit (Lokhttp3/Call;Lokhttp3/Response;)V
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

        sslSocketFactoryOrNull = sslSocketFactory,
        x509TrustManagerOrNull = x509TrustManager,
        certificateChainCleaner = certificateChainCleaner,
      )
    
      override val eventListener: EventListener
        get() = call.eventListener
    
      override val followSslRedirects: Boolean
        get() = call.client.followSslRedirects
    
      override val followRedirects: Boolean
        get() = call.client.followRedirects
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 12.8K bytes
    - Click Count (0)
  5. 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.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:01:42 GMT 2026
    - 3.1K bytes
    - Click Count (1)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt

        val connectionPool: ConnectionPool
    
        /**
         * Returns a new chain with the specified [ConnectionPool].
         */
        fun withConnectionPool(connectionPool: ConnectionPool): Chain
    
        val eventListener: EventListener
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  7. okhttp/api/android/okhttp.api

    	public abstract fun lookup (Ljava/lang/String;)Ljava/util/List;
    }
    
    public final class okhttp3/Dns$Companion {
    }
    
    public abstract class okhttp3/EventListener {
    	public static final field Companion Lokhttp3/EventListener$Companion;
    	public static final field NONE Lokhttp3/EventListener;
    	public fun <init> ()V
    	public fun cacheConditionalHit (Lokhttp3/Call;Lokhttp3/Response;)V
    	public fun cacheHit (Lokhttp3/Call;Lokhttp3/Response;)V
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Mar 10 21:47:20 GMT 2026
    - 72.3K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt

            var first = true
            client =
              client
                .newBuilder()
                .connectionSpecs(listOf(ConnectionSpec.RESTRICTED_TLS, ConnectionSpec.MODERN_TLS))
                .eventListener(
                  object : EventListener() {
                    override fun secureConnectEnd(
                      call: Call,
                      handshake: Handshake?,
                    ) {
                      if (first) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 11 02:37:00 GMT 2026
    - 28.8K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

      fun connectionIsImmediatelyUnhealthy() {
        val listener: EventListener =
          object : EventListener() {
            override fun connectionAcquired(
              call: Call,
              connection: Connection,
            ) {
              connection.socket().closeQuietly()
            }
          }
        client =
          client
            .newBuilder()
            .eventListener(listener)
            .build()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 146.5K bytes
    - Click Count (0)
  10. src/test/java/org/codelibs/fess/job/PythonJobTest.java

            }
    
            @Override
            public <T extends java.util.EventListener> void addListener(T t) {
            }
    
            @Override
            public void addListener(Class<? extends java.util.EventListener> listenerClass) {
            }
    
            @Override
            public <T extends java.util.EventListener> T createListener(Class<T> clazz) {
                return null;
            }
    
            @Override
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 22.2K bytes
    - Click Count (0)
Back to Top