public class Responses
extends java.lang.Object
Response
objects.Modifier and Type | Method and Description |
---|---|
static Response |
failure(SessionId sessionId,
java.lang.Throwable reason)
Creates a response object for a failed command execution.
|
static Response |
failure(SessionId sessionId,
java.lang.Throwable reason,
com.google.common.base.Optional<java.lang.String> screenshot)
Creates a response object for a failed command execution.
|
static Response |
success(SessionId sessionId,
java.lang.Object value)
Creates a response object for a successful command execution.
|
public static Response success(SessionId sessionId, java.lang.Object value)
sessionId
- ID of the session that executed the command.value
- the command result value.public static Response failure(SessionId sessionId, java.lang.Throwable reason)
sessionId
- ID of the session that executed the command.reason
- the failure reason.public static Response failure(SessionId sessionId, java.lang.Throwable reason, com.google.common.base.Optional<java.lang.String> screenshot)
sessionId
- ID of the session that executed the command.reason
- the failure reason.screenshot
- a base64 png screenshot to include with the failure.