java.lang.Object
com.alibaba.dashscope.applications.agentstudio.common.ResultCallback<T>

public abstract class ResultCallback<T> extends Object
Callback receiving asynchronous HTTP results.
  • Constructor Details

    • ResultCallback

      public ResultCallback()
  • Method Details

    • onOpen

      public void onOpen(Status status)
      Will be called as soon as the connection is established, only for http stream request.
      Parameters:
      status - The status.
    • onEvent

      public abstract void onEvent(T message)
      Will be called as soon as the server replies.
      Parameters:
      message - The message body in a structured class.
    • onComplete

      public abstract void onComplete()
      Will be called when all messages are received.
    • onError

      public abstract void onError(Exception e)
      Will be called when an Exception occurs.
      Parameters:
      e - The exception instance.