- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 140 for dispatcher (0.11 sec)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
import mockwebserver3.SocketPolicy.StallSocketAtStart internal fun Dispatcher.wrap(): mockwebserver3.Dispatcher { if (this is QueueDispatcher) return this.delegate val delegate = this return object : mockwebserver3.Dispatcher() { override fun dispatch(request: mockwebserver3.RecordedRequest): mockwebserver3.MockResponse { return delegate.dispatch(request.unwrap()).wrap() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicLoomTest.kt
fun setUp() { platform.assumeLoom() assertThat(System.getProperty("jdk.tracePinnedThreads")).isNotEmpty() client = OkHttpClient.Builder() .trustMockServer() .dispatcher(Dispatcher(newVirtualThreadPerTaskExecutor())) .build() executor = newVirtualThreadPerTaskExecutor() // Capture non-deterministic but probable sysout warnings of pinned threads
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 11:15:46 UTC 2024 - 3.7K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
package okhttp3.slack; import java.io.Closeable; import java.io.IOException; import java.security.SecureRandom; import java.util.LinkedHashMap; import java.util.Map; import okhttp3.HttpUrl; import okhttp3.mockwebserver.Dispatcher; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import okio.ByteString; /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Aug 12 07:26:27 UTC 2021 - 3.8K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
var bodyLimit: Long by delegate::bodyLimit var serverSocketFactory: ServerSocketFactory? by delegate::serverSocketFactory var dispatcher: Dispatcher = QueueDispatcher() set(value) { field = value delegate.dispatcher = value.wrap() } val port: Int get() { before() // This implicitly starts the delegate. return delegate.port }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 5.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
this.taskRunner = okHttpClient.taskRunner } /** * Sets the dispatcher used to set policy and execute asynchronous requests. Must not be null. */ fun dispatcher(dispatcher: Dispatcher) = apply { this.dispatcher = dispatcher } /** * Sets the connection pool used to recycle HTTP and HTTPS connections. *
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:21:33 UTC 2024 - 52K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/LoomTest.kt
@BeforeEach fun setUp(server: MockWebServer) { platform.assumeLoom() this.server = server client = clientTestRule.newClientBuilder() .dispatcher(Dispatcher(newVirtualThreadPerTaskExecutor())) .build() } private fun newVirtualThreadPerTaskExecutor(): ExecutorService {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2K bytes - Viewed (0) -
okhttp/src/main/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)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt
import kotlin.contracts.InvocationKind import kotlin.contracts.contract import okhttp3.Dispatcher import okhttp3.internal.http2.Http2Connection import okhttp3.internal.http2.Http2Stream import okhttp3.internal.http2.Http2Writer /** * Centralisation of central locks according to docs/contribute/concurrency.md */ internal object Locks { inline fun <T> Dispatcher.withLock(action: () -> T): T {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 2.1K bytes - Viewed (0) -
okhttp-coroutines/README.md
```kotlin val call = client.newCall(request) call.executeAsync().use { response -> withContext(Dispatchers.IO) { println(response.body?.string()) } } ``` This is implemented using `suspendCancellableCoroutine` but uses the standard Dispatcher in OkHttp. This means that by default Kotlin's Dispatchers are not used. Cancellation if implemented sensibly in both directions.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Nov 09 15:47:27 UTC 2023 - 609 bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import okhttp3.mockwebserver.Dispatcher; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import okio.Buffer; import okio.Okio; public class SampleServer extends Dispatcher { private final SSLContext sslContext; private final String root; private final int port;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Jan 02 02:50:44 UTC 2019 - 4.7K bytes - Viewed (0)