- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 14 for QueueDispatcher (0.08 seconds)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/QueueDispatcher.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.mockwebserver import mockwebserver3.QueueDispatcher class QueueDispatcher : Dispatcher() { internal val delegate = QueueDispatcher() @Throws(InterruptedException::class) override fun dispatch(request: RecordedRequest): MockResponse = throw UnsupportedOperationException("unexpected call")
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jun 14 16:09:26 GMT 2025 - 1.3K bytes - Click Count (0) -
mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt
import java.util.concurrent.LinkedBlockingQueue import java.util.logging.Logger /** * Default dispatcher that processes a script of responses. Populate the script by calling * [enqueue]. */ public open class QueueDispatcher : Dispatcher() { protected val responseQueue: BlockingQueue<MockResponse> = LinkedBlockingQueue() private var failFastResponse: MockResponse? = null @Throws(InterruptedException::class)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jun 14 16:09:26 GMT 2025 - 2.9K bytes - Click Count (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
} @Test @Ignore fun queueDispatcher() { val queueDispatcher: QueueDispatcher = QueueDispatcher() var mockResponse: MockResponse = queueDispatcher.dispatch( RecordedRequest("", headersOf(), listOf(), 0L, Buffer(), 0, Socket()), ) mockResponse = queueDispatcher.peek() queueDispatcher.enqueueResponse(MockResponse()) queueDispatcher.shutdown()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
} @Test fun queueDispatcher() { val queueDispatcher = QueueDispatcher() var mockResponse: MockResponse = queueDispatcher.dispatch( RecordedRequest("", headersOf(), listOf(), 0L, Buffer(), 0, Socket()), ) mockResponse = queueDispatcher.peek() queueDispatcher.enqueueResponse(MockResponse()) queueDispatcher.shutdown() queueDispatcher.setFailFast(false)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) -
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() public val socketAddress: InetSocketAddress
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 40.3K bytes - Click Count (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
import mockwebserver3.SocketEffect.CloseStream import mockwebserver3.SocketEffect.ShutdownConnection import okio.Buffer import okio.ByteString internal fun Dispatcher.wrap(): mockwebserver3.Dispatcher { if (this is QueueDispatcher) return this.delegate val delegate = this return object : mockwebserver3.Dispatcher() {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 4.3K bytes - Click Count (1) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
val requestCount: Int by delegate::requestCount 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.portCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 00:19:42 GMT 2025 - 4.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 67.5K bytes - Click Count (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun method ()Ljava/lang/String; public final fun path ()Ljava/lang/String; public final fun response ()Lokhttp3/mockwebserver/MockResponse; } public final class okhttp3/mockwebserver/QueueDispatcher : okhttp3/mockwebserver/Dispatcher { public fun <init> ()V public fun dispatch (Lokhttp3/mockwebserver/RecordedRequest;)Lokhttp3/mockwebserver/MockResponse;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jul 22 12:28:51 GMT 2023 - 10.2K bytes - Click Count (0) -
mockwebserver/api/mockwebserver3.api
public final fun getMethod ()Ljava/lang/String; public final fun getPath ()Ljava/lang/String; public final fun getResponse ()Lmockwebserver3/MockResponse; } public class mockwebserver3/QueueDispatcher : mockwebserver3/Dispatcher { public fun <init> ()V public fun clear ()V public fun close ()V public fun dispatch (Lmockwebserver3/RecordedRequest;)Lmockwebserver3/MockResponse;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 11.8K bytes - Click Count (0)