类 SseClient

java.lang.Object
okhttp3.sse.EventSourceListener
com.agentsflex.core.model.client.impl.SseClient
所有已实现的接口:
StreamClient

public class SseClient extends okhttp3.sse.EventSourceListener implements StreamClient
  • 字段详细资料

  • 构造器详细资料

    • SseClient

      public SseClient()
    • SseClient

      public SseClient(okhttp3.OkHttpClient okHttpClient)
  • 方法详细资料

    • getOkHttpClient

      public okhttp3.OkHttpClient getOkHttpClient()
    • setOkHttpClient

      public void setOkHttpClient(okhttp3.OkHttpClient okHttpClient)
    • start

      public void start(String url, Map<String,String> headers, String payload, StreamClientListener listener, ChatConfig config)
      指定者:
      start 在接口中 StreamClient
    • stop

      public void stop()
      指定者:
      stop 在接口中 StreamClient
    • onClosed

      public void onClosed(@NotNull okhttp3.sse.EventSource eventSource)
      覆盖:
      onClosed 在类中 okhttp3.sse.EventSourceListener
    • onEvent

      public void onEvent(@NotNull okhttp3.sse.EventSource eventSource, @Nullable String id, @Nullable String type, @NotNull String data)
      覆盖:
      onEvent 在类中 okhttp3.sse.EventSourceListener
    • onFailure

      public void onFailure(@NotNull okhttp3.sse.EventSource eventSource, @Nullable Throwable t, @Nullable okhttp3.Response response)
      覆盖:
      onFailure 在类中 okhttp3.sse.EventSourceListener
    • onOpen

      public void onOpen(@NotNull okhttp3.sse.EventSource eventSource, @NotNull okhttp3.Response response)
      覆盖:
      onOpen 在类中 okhttp3.sse.EventSourceListener
    • tryToStop

      private void tryToStop()