JsonRpcResponse

sealed trait JsonRpcResponse extends JsonRpcMessage

Defines JSON-RPC response.

See also
Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

Gets error.

Gets error.

Throws
NoSuchElementException

if no error

def isError: Boolean

Tests for error.

Tests for error.

def isResult: Boolean

Tests for result.

Tests for result.

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

Puts attribute.

Puts attribute.

Value Params
name

attribute name

value

attribute value

Returns

new response

Note

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

def removeAttribute(name: String): JsonRpcResponse

Removes attribute.

Removes attribute.

Value Params
name

attribute name

Returns

new response

Gets result.

Gets result.

Throws
NoSuchElementException

if no result

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

Sets attributes.

Sets attributes.

Returns

new response

Inherited methods

def attribute[T](name: String): T

Gets attribute value.

Gets attribute value.

Value Params
name

attribute name

Throws
NoSuchElementException

if attribute does not exist

Inherited from
JsonRpcMessage
def attributes: Map[String, Any]

Gets attributes.

Gets attributes.

Note

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

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

Gets optional attribute value.

Gets optional attribute value.

Value Params
name

attribute name

Inherited from
JsonRpcMessage
def getAttributeOrElse[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 Params
default

default value

name

attribute name

Inherited from
JsonRpcMessage

Gets identifier.

Gets identifier.

Inherited from
JsonRpcMessage
def version: String

Gets JSON-RPC version.

Gets JSON-RPC version.

Inherited from
JsonRpcMessage