public final class RealEventSource extends Object implements okhttp3.sse.EventSource, ServerSentEventReader.Callback, okhttp3.Callback
| 构造器和说明 |
|---|
RealEventSource(okhttp3.Request request,
EventSourceListener listener) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
cancel() |
void |
connect(okhttp3.OkHttpClient client) |
void |
onEvent(String id,
String type,
String data,
String meta) |
void |
onFailure(okhttp3.Call call,
IOException e) |
void |
onResponse(okhttp3.Call call,
okhttp3.Response response) |
void |
onRetryChange(long timeMs) |
void |
processResponse(okhttp3.Response response) |
okhttp3.Request |
request() |
public RealEventSource(okhttp3.Request request,
EventSourceListener listener)
public void connect(okhttp3.OkHttpClient client)
public void onResponse(okhttp3.Call call,
okhttp3.Response response)
onResponse 在接口中 okhttp3.Callbackpublic void processResponse(okhttp3.Response response)
public void onFailure(okhttp3.Call call,
IOException e)
onFailure 在接口中 okhttp3.Callbackpublic okhttp3.Request request()
request 在接口中 okhttp3.sse.EventSourcepublic void cancel()
cancel 在接口中 okhttp3.sse.EventSourcepublic void onEvent(String id, String type, String data, String meta)
onEvent 在接口中 ServerSentEventReader.Callbackpublic void onRetryChange(long timeMs)
onRetryChange 在接口中 ServerSentEventReader.CallbackCopyright © 2023. All rights reserved.