Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for listeners (0.41 sec)

  1. docs/features/events.md

    ### Events with Retries and Follow-Ups
    
    OkHttp is resilient and can automatically recover from some connectivity failures. In this case, the `connectFailed()` event is not terminal and not followed by `callFailed()`. Event listeners will receive multiple events of the same type when retries are attempted.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     * [RFC 2817][1]. The HTTP CONNECT request that creates this tunnel connection is special: it
     * does not participate in any [interceptors][Interceptor] or [event listeners][EventListener]. It
     * doesn't include the motivating request's HTTP headers or even its full URL; only the target
     * server's hostname is sent to the proxy.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

        Listener listener;
        synchronized (this) {
          listener = listeners.get(state);
        }
    
        if (code == null || listener == null) {
          return new MockResponse()
              .setResponseCode(404)
              .setBody("unexpected request");
        }
    
        try {
          OAuthSession session = slackApi.exchangeCode(code, redirectUrl());
          listener.sessionGranted(session);
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Request.kt

         * [Request.tag]. Use null to remove any existing tag assigned for [T].
         *
         * Use this API to attach timing, debugging, or other application data to a request so that
         * you may read it in interceptors, event listeners, or callbacks.
         */
        @JvmName("reifiedTag")
        inline fun <reified T : Any> tag(tag: T?): Builder = tag(T::class, tag)
    
        /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. native-image-tests/src/main/kotlin/okhttp3/RunTests.kt

    import org.junit.platform.launcher.core.LauncherConfig
    import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder
    import org.junit.platform.launcher.core.LauncherFactory
    import org.junit.platform.launcher.listeners.SummaryGeneratingListener
    
    /**
     * Graal main method to run tests with minimal reflection and automatic settings.
     * Uses the test list in native-image-tests/src/main/resources/testlist.txt.
     */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        return EventSource.Factory { request, listener ->
          val actualRequest =
            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:18:15 GMT 2024
    - 1.6K bytes
    - Viewed (1)
  7. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

         * asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be
         * notified. The caller must cancel the returned event source when it is no longer in use.
         */
        fun newEventSource(
          request: Request,
          listener: EventSourceListener,
        ): EventSource
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

      @RegisterExtension
      @JvmField
      var clientTestRule = OkHttpClientTestRule()
    
      private val listener = RecordingEventListener()
      private val handshakeCertificates = platform.localhostHandshakeCertificates()
    
      private var client =
        clientTestRule.newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
    
      private lateinit var server: MockWebServer
    
      @BeforeEach
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  9. samples/slack/src/main/java/okhttp3/slack/SlackApi.java

        }
      }
    
      /** See https://api.slack.com/rtm. */
      public WebSocket rtm(HttpUrl url, WebSocketListener listener) {
        return httpClient.newWebSocket(new Request.Builder()
            .url(url)
            .build(), listener);
      }
    
      static final class SlackJsonAdapters {
        @ToJson String urlToJson(HttpUrl httpUrl) {
          return httpUrl.toString();
        }
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Jul 06 19:30:55 GMT 2018
    - 4.4K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

      private var protocol: Protocol?,
      private var source: BufferedSource?,
      private var sink: BufferedSink?,
      private val pingIntervalMillis: Int,
      internal val connectionListener: ConnectionListener,
    ) : Http2Connection.Listener(), Connection, ExchangeCodec.Carrier {
      private var http2Connection: Http2Connection? = null
    
      internal val lock: ReentrantLock = ReentrantLock()
    
      // These properties are guarded by [lock].
    
      /**
    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)
Back to top