public abstract static class ApplicationClient.StreamEventListener
extends okhttp3.sse.EventSourceListener
| Constructor and Description |
|---|
StreamEventListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
onClosed() |
void |
onClosed(okhttp3.sse.EventSource eventSource) |
abstract void |
onEvent(CompletionsResponse response)
event消息回调函数
|
void |
onEvent(okhttp3.sse.EventSource eventSource,
String id,
String type,
String data) |
void |
onFailure(okhttp3.sse.EventSource eventSource,
Throwable t,
okhttp3.Response response) |
void |
onFailure(@Nullable Throwable t,
int code,
String body)
event失败消息回调函数
|
void |
onOpen() |
void |
onOpen(okhttp3.sse.EventSource eventSource,
okhttp3.Response response) |
public void onEvent(okhttp3.sse.EventSource eventSource,
String id,
String type,
String data)
onEvent in class okhttp3.sse.EventSourceListenerpublic void onFailure(okhttp3.sse.EventSource eventSource,
Throwable t,
okhttp3.Response response)
onFailure in class okhttp3.sse.EventSourceListenerpublic void onOpen(okhttp3.sse.EventSource eventSource,
okhttp3.Response response)
onOpen in class okhttp3.sse.EventSourceListenerpublic void onClosed(okhttp3.sse.EventSource eventSource)
onClosed in class okhttp3.sse.EventSourceListenerpublic abstract void onEvent(CompletionsResponse response)
response - 回调消息public void onFailure(@Nullable
@Nullable Throwable t,
int code,
String body)
t - 错误消息栈code - 错误代码body - 错误内容public void onOpen()
public void onClosed()
Copyright © 2024. All rights reserved.