Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for QueueDispatcher (0.09 sec)

  1. 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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  2. 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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  3. CHANGELOG.md

        possible to implement decorators for cache encryption or compression.
     *  New: `Cookie.newBuilder()` to build upon an existing cookie.
     *  New: Use TLSv1.3 when running on JDK 8u261 or newer.
     *  New: `QueueDispatcher.clear()` may be used to reset a MockWebServer instance.
     *  New: `FileDescriptor.toRequestBody()` may be particularly useful for users of Android's Storage
        Access Framework.
     *  Upgrade: [Kotlin 1.5.31][kotlin_1_5_31].
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 31.6K bytes
    - Viewed (1)
  4. 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;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  5. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

          .toUrl()
          .openConnection()
          .getInputStream() // Should succeed.
      }
    
      @Test
      fun clearDispatcherQueue() {
        server.enqueue(MockResponse(body = "A"))
        (server.dispatcher as QueueDispatcher).clear()
        server.enqueue(MockResponse(body = "B"))
        val inputStream =
          server
            .url("/a")
            .toUrl()
            .openConnection()
            .getInputStream()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Aug 03 22:38:00 UTC 2025
    - 28K bytes
    - Viewed (0)
  6. 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;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          fail<Any>()
        } catch (expected: ConnectException) {
        }
      }
    
      @Test
      fun shutdownWhileBlockedDispatching() {
        // Enqueue a request that'll cause MockWebServer to hang on QueueDispatcher.dispatch().
        val connection = server.url("/").toUrl().openConnection() as HttpURLConnection
        connection.setReadTimeout(500)
        try {
          connection.getResponseCode()
          fail<Any>()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 22.3K bytes
    - Viewed (0)
Back to top