JsonRpcResponseBuilder

grapple.json.rpc.JsonRpcResponseBuilder

Provides JSON-RPC response builder.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def attributes(value: Map[String, Any]): JsonRpcResponseBuilder.this.type

Sets attributes.

Sets attributes.

Attributes

def attributes(one: (String, Any), more: (String, Any)*): JsonRpcResponseBuilder.this.type

Sets attributes.

Sets attributes.

Attributes

def error(value: JsonRpcError): JsonRpcResponseBuilder.this.type

Sets error.

Sets error.

Attributes

def error(code: Int, message: String, data: Option[JsonValue]): JsonRpcResponseBuilder.this.type

Sets error.

Sets error.

Value parameters

code

error code

data

optional additional data

message

error message

Attributes

def error(code: Int, message: String, data: JsonValue): JsonRpcResponseBuilder.this.type

Sets error.

Sets error.

Value parameters

code

error code

data

additional data

message

error message

Attributes

Sets identifier.

Sets identifier.

Attributes

def id(value: String): JsonRpcResponseBuilder.this.type

Sets identifier.

Sets identifier.

Attributes

def id(value: Long): JsonRpcResponseBuilder.this.type

Sets identifier.

Sets identifier.

Attributes

def idNull(): JsonRpcResponseBuilder.this.type

Sets identifier to null value.

Sets identifier to null value.

Attributes

def result(value: JsonValue): JsonRpcResponseBuilder.this.type

Sets result.

Sets result.

Attributes

Sets either result or error.

Sets either result or error.

Attributes

Creates JSON-RPC response with current settings.

Creates JSON-RPC response with current settings.

Attributes

def tryResult(value: => JsonValue)(using onFailure: PartialFunction[Throwable, JsonRpcError]): JsonRpcResponseBuilder.this.type

Tries to set result or sets error on failure.

Tries to set result or sets error on failure.

Attributes

Note

If value throws exception that does not match onFailure, then the exception is raised.

def version(value: String): JsonRpcResponseBuilder.this.type

Sets version.

Sets version.

Attributes