Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for EventSourceListener (0.73 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.sse
    
    import okhttp3.Response
    
    abstract class EventSourceListener {
      /**
       * Invoked when an event source has been accepted by the remote peer and may begin transmitting
       * events.
       */
      open fun onOpen(
        eventSource: EventSource,
        response: Response,
      ) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. okhttp-sse/api/okhttp-sse.api

    	public static fun enqueue (Lokhttp3/Call;Lokhttp3/sse/EventSourceListener;)Lokhttp3/sse/EventSource;
    	public static fun process (Lokhttp3/Response;Lokhttp3/sse/EventSourceListener;)V
    	public abstract fun request ()Lokhttp3/Request;
    }
    
    public final class okhttp3/sse/EventSource$Companion {
    	public final fun enqueue (Lokhttp3/Call;Lokhttp3/sse/EventSourceListener;)Lokhttp3/sse/EventSource;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

         */
        @JvmStatic
        @JvmName("enqueue")
        fun Call.enqueueEventSource(listener: EventSourceListener): EventSource = RealEventSource(this, listener).also(this::enqueue)
    
        /**
         * Processes the existing response with [listener].
         */
        @JvmStatic
        @JvmName("process")
        fun Response.processEventSource(listener: EventSourceListener) = RealEventSource(this, listener).processResponse(this)
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  4. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java

    import mockwebserver3.MockWebServer;
    import mockwebserver3.junit5.StartStop;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    import okhttp3.sse.EventSource;
    import okhttp3.sse.EventSourceListener;
    import org.jetbrains.annotations.NotNull;
    import org.jetbrains.annotations.Nullable;
    import org.junit.jupiter.api.Test;
    
    import java.util.concurrent.CompletableFuture;
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  5. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

    import okhttp3.sse.EventSource
    import okhttp3.sse.EventSourceListener
    
    internal class RealEventSource private constructor(
      private val call: Call?,
      private val request: Request,
      private val listener: EventSourceListener,
    ) : EventSource,
      ServerSentEventReader.Callback,
      Callback {
      constructor(call: Call, listener: EventSourceListener) : this(call, call.request(), listener)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  6. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt

    import okhttp3.Response
    import okhttp3.internal.platform.Platform
    import okhttp3.internal.platform.Platform.Companion.get
    import okhttp3.sse.EventSource
    import okhttp3.sse.EventSourceListener
    
    class EventSourceRecorder : EventSourceListener() {
      private val events = LinkedBlockingDeque<Any>()
      private var cancel = false
    
      fun enqueueCancel() {
        cancel = true
      }
    
      override fun onOpen(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:32:52 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/UnreadableResponseBody.kt

          """
          |Unreadable ResponseBody! These Response objects have bodies that are stripped:
          | * Response.cacheResponse
          | * Response.networkResponse
          | * Response.priorResponse
          | * EventSourceListener
          | * WebSocketListener
          |(It is safe to call contentType() and contentLength() on these response bodies.)
          """.trimMargin(),
        )
    
      override fun timeout() = Timeout.NONE
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 15:19:53 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  8. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

            imports = ["okhttp3.sse.EventSource.Companion.processEventSource"],
          ),
        level = DeprecationLevel.WARNING,
      )
      @JvmStatic
      fun processResponse(
        response: Response,
        listener: EventSourceListener,
      ): Unit = response.processEventSource(listener)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  9. CHANGELOG.md

        backwards-incompatible changes in forthcoming releases.
     *  Fix: Don't crash loading the public suffix database resource in obfuscated builds.
     *  Fix: Don't silently ignore calls to `EventSource.cancel()` made from
        `EventSourceListener.onOpen()`.
     *  Fix: Enforce the max intermediates constraint when using pinned certificates with Conscrypt.
        This impacts Conscrypt when the server's presented certificates form both a trusted-but-unpinned
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 19:32:33 UTC 2025
    - 31.6K bytes
    - Viewed (1)
Back to top