Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 59 for dispatch (0.17 sec)

  1. docs/features/calls.md

    ## Dispatch
    
    For synchronous calls, you bring your own thread and are responsible for managing how many simultaneous requests you make. Too many simultaneous connections wastes resources; too few harms latency.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/PushObserver.kt

    import java.io.IOException
    import okhttp3.Protocol
    import okio.BufferedSource
    
    /**
     * [HTTP/2][Protocol.HTTP_2] only. Processes server-initiated HTTP requests on the client.
     * Implementations must quickly dispatch callbacks to avoid creating a bottleneck.
     *
     * While [onReset] may occur at any time, the following callbacks are expected in order,
     * correlated by stream ID.
     *
     *  * [onRequest]
     *  * [onHeaders] (unless canceled)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. 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)
  4. okhttp/src/test/java/okhttp3/CallTest.kt

       */
      @Test
      fun canceledBeforeIOSignalsOnFailure() {
        // Force requests to be executed serially.
        val dispatcher = Dispatcher(client.dispatcher.executorService)
        dispatcher.maxRequests = 1
        client =
          client.newBuilder()
            .dispatcher(dispatcher)
            .build()
        val requestA = Request(server.url("/a"))
        val requestB = Request(server.url("/b"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  5. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

      @Override public synchronized void onOpen(WebSocket webSocket, Response response) {
        System.out.println("onOpen: " + response);
      }
    
      // TOOD(jwilson): decode incoming messages and dispatch them somewhere.
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("onMessage: " + text);
      }
    
      @Override public void onClosing(WebSocket webSocket, int code, String reason) {
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Nov 19 20:16:58 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // We use a re-entrant dispatcher to initiate one HTTPS connection while the other is in flight.
        server.dispatcher =
          object : Dispatcher() {
            var requestCount = 0
    
            override fun dispatch(request: RecordedRequest): MockResponse {
              val result = queueDispatcher.dispatch(request)
              requestCount++
              if (requestCount == 1) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  9. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/CookieJar$Companion$NoCookies;->loadForRequest(Lokhttp3/HttpUrl;)Ljava/util/List;
    HSPLokhttp3/CookieJar;-><clinit>()V
    HSPLokhttp3/Dispatcher;-><init>()V
    HSPLokhttp3/Dispatcher;->finished$okhttp(Lokhttp3/internal/connection/RealCall$AsyncCall;)V
    HSPLokhttp3/Dispatcher;->finished(Ljava/util/Deque;Ljava/lang/Object;)V
    HSPLokhttp3/Dispatcher;->promoteAndExecute()Z
    HSPLokhttp3/Dns$Companion$DnsSystem;-><init>()V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
  10. 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)
Back to top