All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.dashscope.protocol.FullDuplexClient Maven / Gradle / Ivy

There is a newer version: 2.16.9
Show newest version
// Copyright (c) Alibaba, Inc. and its affiliates.

package com.alibaba.dashscope.protocol;

import com.alibaba.dashscope.common.DashScopeResult;
import com.alibaba.dashscope.common.ResultCallback;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import io.reactivex.Flowable;

public interface FullDuplexClient {
  /*
   * Multiple inputs, only for websocket.
   */
  DashScopeResult streamIn(FullDuplexRequest req) throws NoApiKeyException, ApiException;

  void streamIn(FullDuplexRequest req, ResultCallback callback)
      throws NoApiKeyException, ApiException;

  /* Send and receive are duplex, only support websocket.
   *
   */
  Flowable duplex(FullDuplexRequest req) throws NoApiKeyException, ApiException;

  void duplex(FullDuplexRequest req, ResultCallback callback)
      throws NoApiKeyException, ApiException;

  boolean close(int code, String reason);

  void cancel();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy