Class ResultCallback<T>
java.lang.Object
com.alibaba.dashscope.applications.agentstudio.common.ResultCallback<T>
Callback receiving asynchronous HTTP results.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidWill be called when all messages are received.abstract voidWill be called when an Exception occurs.abstract voidWill be called as soon as the server replies.voidWill be called as soon as the connection is established, only for http stream request.
-
Constructor Details
-
ResultCallback
public ResultCallback()
-
-
Method Details
-
onOpen
Will be called as soon as the connection is established, only for http stream request.- Parameters:
status- The status.
-
onEvent
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
Will be called when an Exception occurs.- Parameters:
e- The exception instance.
-