Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for onEvent (0.03 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerAdapter.kt

        call: Call,
        ioe: IOException,
      ) = onEvent(ResponseFailed(System.nanoTime(), call, ioe))
    
      override fun callEnd(call: Call) = onEvent(CallEnd(System.nanoTime(), call))
    
      override fun callFailed(
        call: Call,
        ioe: IOException,
      ) = onEvent(CallFailed(System.nanoTime(), call, ioe))
    
      override fun canceled(call: Call) = onEvent(Canceled(System.nanoTime(), call))
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt

      private val callback: Callback,
    ) {
      private var lastId: String? = null
    
      interface Callback {
        fun onEvent(
          id: String?,
          type: String?,
          data: String,
        )
    
        fun onRetryChange(timeMs: Long)
      }
    
      /**
       * Process the next event. This will result in a single call to [Callback.onEvent] *unless* the
       * data section was empty. Any number of calls to [Callback.onRetryChange] may occur while
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 07:51:20 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/EventListenerRelay.kt

      val eventRecorder: EventRecorder,
    ) {
      private val eventListenerAdapter =
        EventListenerAdapter()
          .apply {
            listeners += ::onEvent
          }
    
      val eventListener: EventListener
        get() = eventListenerAdapter
    
      var eventCount = 0
    
      private fun onEvent(callEvent: CallEvent) {
        if (eventCount++ == 0) {
          eventRecorder.logEvent(callEvent)
          val next = EventListenerRelay(call, eventRecorder)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  4. okhttp-sse/api/okhttp-sse.api

    }
    
    public abstract class okhttp3/sse/EventSourceListener {
    	public fun <init> ()V
    	public fun onClosed (Lokhttp3/sse/EventSource;)V
    	public fun onEvent (Lokhttp3/sse/EventSource;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    	public fun onFailure (Lokhttp3/sse/EventSource;Ljava/lang/Throwable;Lokhttp3/Response;)V
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 07:51:20 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  5. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

      }
    
      override fun request(): Request = request
    
      override fun cancel() {
        canceled = true
        call?.cancel()
      }
    
      override fun onEvent(
        id: String?,
        type: String?,
        data: String,
      ) {
        listener.onEvent(this, id, type, data)
      }
    
      override fun onRetryChange(timeMs: Long) {
        // Ignored. We do not auto-retry.
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 07:51:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  6. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

       * events.
       */
      open fun onOpen(
        eventSource: EventSource,
        response: Response,
      ) {
      }
    
      open fun onEvent(
        eventSource: EventSource,
        id: String?,
        type: String?,
        data: String,
      ) {
      }
    
      /**
       * No further calls to this listener will be made.
       */
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 07:51:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
Back to top