public class ConnectionResult extends Object
| Modifier and Type | Method and Description |
|---|---|
static ConnectionResult |
failure(String message) |
static ConnectionResult |
failure(String message,
Throwable error) |
PeerConnection |
getConnection() |
Optional<Throwable> |
getError() |
Optional<String> |
getMessage() |
boolean |
isSuccess() |
static ConnectionResult |
success(PeerConnection connection) |
public static ConnectionResult success(PeerConnection connection)
public static ConnectionResult failure(String message, Throwable error)
public static ConnectionResult failure(String message)
public boolean isSuccess()
public PeerConnection getConnection()
isSuccess() is trueIllegalStateException - if isSuccess() is falsepublic Optional<Throwable> getError()
isSuccess() is falseIllegalStateException - if isSuccess() is trueCopyright © 2016–2021. All rights reserved.