Class SynchronizeHalfDuplexApi<ParamT extends HalfDuplexParamBase>

java.lang.Object
com.alibaba.dashscope.legacy_2x.api.SynchronizeHalfDuplexApi<ParamT>

@Deprecated public final class SynchronizeHalfDuplexApi<ParamT extends HalfDuplexParamBase> extends Object
Deprecated.
Dashscope synchronize half duplex request processing, both http and websocket support.
  • Constructor Details

    • SynchronizeHalfDuplexApi

      public SynchronizeHalfDuplexApi(ServiceOption serviceOptions)
      Deprecated.
      Create default client, http or websocket.
      Parameters:
      serviceOptions - The service option.
    • SynchronizeHalfDuplexApi

      public SynchronizeHalfDuplexApi(ConnectionOptions connectionOptions, ServiceOption serviceOptions)
      Deprecated.
      Create custom client
      Parameters:
      connectionOptions - The client option.
      serviceOptions - The api service option.
  • Method Details

    • call

      Deprecated.
      Call the server to get the whole result.
      Parameters:
      param - The input param, should be the subclass of `ConversationParam`.
      Returns:
      The output structure, should be the subclass of `ConversationResult`.
      Throws:
      NoApiKeyException - Can not find api key
      ApiException - The request failed, possibly due to a network or data error.
    • call

      public void call(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException
      Deprecated.
      Call the server to get the result in the callback function.
      Parameters:
      param - The input param, should be the subclass of `Param`.
      callback - The callback to receive response, should be the subclass of `Result`.
      Throws:
      NoApiKeyException - Can not find api key
      ApiException - The request failed, possibly due to a network or data error.
    • streamCall

      public io.reactivex.Flowable<DashScopeResult> streamCall(ParamT param) throws ApiException, NoApiKeyException
      Deprecated.
      Call the server to get the result by stream.
      Parameters:
      param - The input param, should be the subclass of `Param`.
      Returns:
      A `Flowable` of the output structure, which is the subclass of `Result`.
      Throws:
      NoApiKeyException - Can not find api key
      ApiException - The request failed, possibly due to a network or data error.
    • streamCall

      public void streamCall(ParamT param, ResultCallback<DashScopeResult> callback) throws ApiException, NoApiKeyException
      Deprecated.
      Call the server to get the result by stream.
      Parameters:
      param - The input param, should be the subclass of `Param`.
      callback - The result callback.
      Throws:
      NoApiKeyException - Can not find api key
      ApiException - The request failed, possibly due to a network or data error.
    • close

      public boolean close(int code, String reason)
      Deprecated.