- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for eventListenerFactory (0.25 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
* 1. In your main method `WireSharkListenerFactory.register()` * 2. Create Listener factory `val eventListenerFactory = WireSharkListenerFactory( logFile = File("/tmp/key.log"), tlsVersions = tlsVersions, launch = launch)` * 3. Register with `client.eventListenerFactory(eventListenerFactory)` * 4. Launch wireshark if not done externally `val process = eventListenerFactory.launchWireShark()` */ @SuppressSignatureCheck class WireSharkListenerFactory(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 10.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
} fun wrap(eventListener: EventListener) = EventListener.Factory { ClientRuleEventListener(eventListener, ::addEvent) } fun wrap(eventListenerFactory: EventListener.Factory) = EventListener.Factory { call -> ClientRuleEventListener(eventListenerFactory.create(call), ::addEvent) } /** * Returns an OkHttpClient for tests to use as a starting point. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 10.5K bytes - Viewed (0) -
android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt
var socketClass: String? = null // Need fresh client to reset sslSocketFactoryOrNull client = OkHttpClient .Builder() .eventListenerFactory( clientTestRule.wrap( object : EventListener() { override fun connectionAcquired( call: Call, connection: Connection,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 14:12:28 UTC 2025 - 29K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt
*/ @get:JvmName("networkInterceptors") val networkInterceptors: List<Interceptor> = builder.networkInterceptors.toImmutableList() @get:JvmName("eventListenerFactory") val eventListenerFactory: EventListener.Factory = builder.eventListenerFactory @get:JvmName("retryOnConnectionFailure") val retryOnConnectionFailure: Boolean = builder.retryOnConnectionFailure @get:JvmName("fastFallback")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 51.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt
private lateinit var client: OkHttpClient private lateinit var url: HttpUrl @BeforeEach fun setUp() { client = clientTestRule .newClientBuilder() .eventListenerFactory(loggingEventListenerFactory) .sslSocketFactory( handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).retryOnConnectionFailure(false) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 10.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
.addNetworkInterceptor( Interceptor { chain: Interceptor.Chain? -> connection.set(chain!!.connection()) chain.proceed(chain.request()) }, ).eventListenerFactory(clientTestRule.wrap(listener1)) .build() val request = Request.Builder().url(sanUrl).build() val call1 = client1.newCall(request) call1.enqueue( object : Callback {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 11:44:16 UTC 2025 - 19.1K bytes - Viewed (0) -
android-test/src/test/kotlin/okhttp/android/test/AndroidLoggingTest.kt
) // We should consider if these logs should retain Exceptions assertThat(logs.last().throwable).isNull() } @Test fun testLoggingEventListener() { val client = clientBuilder.eventListenerFactory(LoggingEventListener.Factory()).build() try { client.newCall(request).execute() } catch (uhe: UnknownHostException) { // expected }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Aug 21 14:27:04 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt
private var listener = RecordingEventListener() private val handshakeCertificates = platform.localhostHandshakeCertificates() private var client = clientTestRule .newClientBuilder() .eventListenerFactory(clientTestRule.wrap(listener)) .build() @Test fun upgrade() { val socketHandler = MockSocketHandler() .apply { receiveRequest("client says hello\n")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 7.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val interceptors: List<Interceptor> = client.interceptors val networkInterceptors: List<Interceptor> = client.networkInterceptors val eventListenerFactory: EventListener.Factory = client.eventListenerFactory val proxySelector: ProxySelector = client.proxySelector val cookieJar: CookieJar = client.cookieJar val cache: Cache? = client.cache
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt
this.enableSessionCreation = false } } } client = client .newBuilder() .connectionSpecs(listOf(spec)) .eventListenerFactory( clientTestRule.wrap( object : EventListener() { override fun connectionAcquired( call: Call, connection: Connection, ) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6K bytes - Viewed (1)