public interface ExecListener
Modifier and Type | Method and Description |
---|---|
void |
onClose(int code,
String reason)
Called when the server sends a close message.
|
void |
onFailure(IOException e,
okhttp3.Response response)
Called when the transport or protocol layer of this web socket errors during communication.
|
void |
onOpen(okhttp3.Response response)
Called when the request has successfully been upgraded to a web socket.
|
void onOpen(okhttp3.Response response)
void onFailure(IOException e, okhttp3.Response response)
response
- Present when the failure is a direct result of the response (e.g., failed
upgrade, non-101 response code, etc.). null
otherwise.void onClose(int code, String reason)
close()
or as an unprompted
message from the server.code
- The RFC-compliant
status code.reason
- Reason for close or an empty string.Copyright © 2015–2017 Red Hat. All rights reserved.