exceptionstableSource
@API(status = STABLE)
public class NoConnectionException
    extends Exception

Extended Exception for missing network connection.

Gives Diagnostics (DNS, TCP, HTTP Tests), user suggestions and can be serialized as JSON.

Superclasses
Exception → Throwable
Implemented interfaces
Serializable

Methods

public String getActionContext()
Returns
String
public String getActiveOs()
Returns
String
public String getNetworkInterfaceSummary()
Returns
String
public Map<String, ProbeResult> getProbeResults()
public Throwable getRootCause()
Returns
Throwable
public List<String> getSuggestions()
Returns
List<String>
public long getTimestampEpochMillis()
Returns
long
public Instant getTimestampInstant()
Returns
Instant
public static void throwIfOffline(String action, Supplier<Boolean> quickCheck) throws NoConnectionException
Parameters
actionString
quickCheckSupplier<Boolean>
Throws
NoConnectionException
public String toJson()
Returns
String
public String toString()
public String toUserFriendlyMessage()
Returns
String
public boolean wasAnyHttpReachable()
Returns
boolean
public boolean wasAnyTcpReachable()
Returns
boolean
public boolean wasDnsResolved()
Returns
boolean

Nested types

Used by

Methods of other types that accept or return NoConnectionException.