Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for dispatch (0.2 sec)

  1. mockwebserver/api/mockwebserver3.api

    public abstract class mockwebserver3/Dispatcher {
    	public fun <init> ()V
    	public abstract fun dispatch (Lmockwebserver3/RecordedRequest;)Lmockwebserver3/MockResponse;
    	public fun peek ()Lmockwebserver3/MockResponse;
    	public fun shutdown ()V
    }
    
    public final class mockwebserver3/MockResponse {
    	public static final field Companion Lmockwebserver3/MockResponse$Companion;
    	public fun <init> ()V
    	public fun <init> (I)V
    	public fun <init> (ILokhttp3/Headers;)V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 03 21:59:45 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  2. 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;
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jul 22 12:28:51 GMT 2023
    - 10.2K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val connection = server.url("/").toUrl().openConnection() as HttpURLConnection
        connection.setReadTimeout(500)
        try {
          connection.getResponseCode()
          fail<Any>()
        } catch (expected: SocketTimeoutException) {
        }
    
        // Shutting down the server should unblock the dispatcher.
        server.shutdown()
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  4. 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.
       */
      var dispatcher: Dispatcher = QueueDispatcher()
    
      private var portField: Int = -1
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  5. 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))
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  6. okhttp/src/test/java/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.executorService
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        lock.assertHeld()
    
        val routeUrl = route.address.url
    
        if (url.port != routeUrl.port) {
          return false // Port mismatch.
        }
    
        if (url.host == routeUrl.host) {
          return true // Host match. The URL is supported.
        }
    
        // We have a host mismatch. But if the certificate matches, we're still good.
        return !noCoalescedConnections && handshake != null && certificateSupportHost(url, handshake!!)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

       * byte of a frame but no more frames.
       */
      @Test
      fun readTimeoutAppliesWithinFrames() {
        webServer.dispatcher =
          object : Dispatcher() {
            override fun dispatch(request: RecordedRequest): MockResponse {
              return upgradeResponse(request)
                .body(Buffer().write("81".decodeHex())) // Truncated frame.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  9. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

        try {
          InetAddress.getByName("www.google.com")
        } catch (uhe: UnknownHostException) {
          throw TestAbortedException(uhe.message, uhe)
        }
      }
    
      fun OkHttpClient.close() {
        dispatcher.executorService.shutdown()
        connectionPool.evictAll()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  10. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        object : WebSocketListener() {
        }
      val dispatcher = Dispatcher(executor)
      val listener = RecordingEventListener()
      var client =
        clientTestRule.newClientBuilder()
          .dns { throw UnknownHostException() }
          .dispatcher(dispatcher)
          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
    
      @BeforeEach
      fun setUp() {
        dispatcher.maxRequests = 20
        dispatcher.maxRequestsPerHost = 10
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
Back to top