public interface IStatusListener
onPing(IPingResponse, long) method to not be called.onResponse(IPingResponse) if you need the actual response.onError(Throwable) method will be called together with the onResponse(IPingResponse) method.onPing(IPingResponse, long) method is called the ping will be treated successful.| Modifier and Type | Method and Description |
|---|---|
default void |
onConnected()
Called when the connection to the server was established.
|
default void |
onError(java.lang.Throwable throwable)
Called when the ping failed with an exception.
|
default void |
onPing(IPingResponse pingResponse,
long ping)
Called when the ping was successful.
|
default void |
onResponse(IPingResponse pingResponse)
Called when the server responded with a status message.
|
default void onError(java.lang.Throwable throwable)
ConnectionRefusedException - The connection was refused by the server (unbound port, firewall, etc.)UnknownHostException - The server address is invalid or the server is offlineConnectTimeoutException - The connect timed out (server is offline or the connection is too slow)DataReadException - The server responded with invalid dataPacketReadException - The server responded with invalid packetsReadTimeoutException - The server did not respond in timeIOException - An unknown I/O error occurredthrowable - The thrown exceptiondefault void onConnected()
default void onResponse(IPingResponse pingResponse)
pingResponse - The responsedefault void onPing(IPingResponse pingResponse, long ping)
pingResponse - The responseping - The ping in ms