- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 31 for Dispatcher (0.06 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt
import okhttp3.internal.unmodifiable /** * Policy on when async requests are executed. * * Each dispatcher uses an [ExecutorService] to run calls internally. If you supply your own * executor, it should be able to run [the configured maximum][maxRequests] number of calls * concurrently. */ class Dispatcher() { /** * The maximum number of requests to execute concurrently. Above this requests queue in memory,
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Oct 07 14:16:22 GMT 2025 - 9.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt
object : WebSocketListener() { } val dispatcher = Dispatcher(executor) val eventRecorder = EventRecorder() var client = clientTestRule .newClientBuilder() .dns { throw UnknownHostException() } .dispatcher(dispatcher) .eventListenerFactory(clientTestRule.wrap(eventRecorder)) .build() @BeforeEach fun setUp() { dispatcher.maxRequests = 20 dispatcher.maxRequestsPerHost = 10
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 15.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} @Test fun dispatcher() { var dispatcher = Dispatcher() dispatcher = Dispatcher(Executors.newCachedThreadPool()) val maxRequests: Int = dispatcher.maxRequests dispatcher.maxRequests = 0 val maxRequestsPerHost: Int = dispatcher.maxRequestsPerHost dispatcher.maxRequestsPerHost = 0 val executorService: ExecutorService = dispatcher.executorServiceCreated: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 47K bytes - Click Count (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
} /** * The dispatcher used to respond to HTTP requests. The default dispatcher is a [QueueDispatcher], * which serves a fixed sequence of responses from a [queue][enqueue]. * * Other dispatchers can be configured. They can vary the response based on timing or the content * of the request. */ public var dispatcher: Dispatcher = QueueDispatcher()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Aug 02 20:36:00 GMT 2025 - 40.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/EventListener.kt
call: Call, dispatcher: Dispatcher, ) { for (delegate in eventListeners) { delegate.dispatcherQueueStart(call, dispatcher) } } override fun dispatcherQueueEnd( call: Call, dispatcher: Dispatcher, ) { for (delegate in eventListeners) { delegate.dispatcherQueueEnd(call, dispatcher) } }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Oct 07 21:03:04 GMT 2025 - 24.9K bytes - Click Count (0) -
mockwebserver/api/mockwebserver3.api
public abstract class mockwebserver3/Dispatcher : java/io/Closeable { public fun <init> ()V public fun close ()V public abstract fun dispatch (Lmockwebserver3/RecordedRequest;)Lmockwebserver3/MockResponse; public fun peek ()Lmockwebserver3/MockResponse; } public final class mockwebserver3/MockResponse { public fun <init> (ILokhttp3/Headers;Ljava/lang/String;)VCreated: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 11.8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt
callStart() try { client.dispatcher.executed(this) return getResponseWithInterceptorChain() } finally { client.dispatcher.finished(this) } } override fun enqueue(responseCallback: Callback) { check(executed.compareAndSet(false, true)) { "Already Executed" } callStart() client.dispatcher.enqueue(AsyncCall(responseCallback)) }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 19.7K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
.Builder() .connectionPool( buildConnectionPool( connectionListener = connectionListener, taskRunner = taskRunner, ), ).dispatcher(Dispatcher(backend.executor)) .taskRunnerInternal(taskRunner) } else { OkHttpClient .Builder() .connectionPool(ConnectionPool(connectionListener = connectionListener)) }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 10.8K bytes - Click Count (0) -
mockwebserver-deprecated/api/mockwebserver.api
public abstract class okhttp3/mockwebserver/Dispatcher { public fun <init> ()V public abstract fun dispatch (Lokhttp3/mockwebserver/RecordedRequest;)Lokhttp3/mockwebserver/MockResponse; public fun peek ()Lokhttp3/mockwebserver/MockResponse; public fun shutdown ()V } public final class okhttp3/mockwebserver/MockResponse : java/lang/Cloneable { public static final field Companion Lokhttp3/mockwebserver/MockResponse$Companion;Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat Jul 22 12:28:51 GMT 2023 - 10.2K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt
val a = client.newBuilder().build() assertThat(a.dispatcher).isNotNull() assertThat(a.connectionPool).isNotNull() assertThat(a.sslSocketFactory).isNotNull() assertThat(a.x509TrustManager).isNotNull() // Multiple clients share the instances. val b = client.newBuilder().build() assertThat(b.dispatcher).isSameAs(a.dispatcher) assertThat(b.connectionPool).isSameAs(a.connectionPool)
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 13.4K bytes - Click Count (1)