JsonRpcResponse

grapple.json.rpc.JsonRpcResponse
See theJsonRpcResponse companion object
sealed trait JsonRpcResponse extends JsonRpcMessage

Defines JSON-RPC response.

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Gets error.

Gets error.

Attributes

Throws
NoSuchElementException

if no error

def isError: Boolean

Tests for error.

Tests for error.

Attributes

def isResult: Boolean

Tests for result.

Tests for result.

Attributes

def put(name: String, value: Any): JsonRpcResponse

Puts attribute.

Puts attribute.

Value parameters

name

attribute name

value

attribute value

Attributes

Returns

new response

Note

If attribute already exists with given name, then its value is replaced.

def remove(name: String): JsonRpcResponse

Removes attribute.

Removes attribute.

Value parameters

name

attribute name

Attributes

Returns

new response

Gets result.

Gets result.

Attributes

Throws
NoSuchElementException

if no result

def setAttributes(attributes: Map[String, Any]): JsonRpcResponse

Sets attributes.

Sets attributes.

Attributes

Returns

new response

Inherited methods

def attributes: Map[String, Any]

Gets attributes.

Gets attributes.

Attributes

Note

Attributes are arbitrary values associated with message and are not included in transmission.

Inherited from:
JsonRpcMessage
def get[T](name: String): T

Gets attribute value.

Gets attribute value.

Value parameters

name

attribute name

Attributes

Throws
NoSuchElementException

if attribute does not exist

Inherited from:
JsonRpcMessage
def getOption[T](name: String): Option[T]

Optionally gets attribute value.

Optionally gets attribute value.

Value parameters

name

attribute name

Attributes

Inherited from:
JsonRpcMessage
def getOrElse[T](name: String, default: => T): T

Gets attribute value or returns default if attribute does not exist.

Gets attribute value or returns default if attribute does not exist.

Value parameters

default

default value

name

attribute name

Attributes

Inherited from:
JsonRpcMessage

Gets identifier.

Gets identifier.

Attributes

Inherited from:
JsonRpcMessage
def version: String

Gets JSON-RPC version.

Gets JSON-RPC version.

Attributes

Inherited from:
JsonRpcMessage