Home Reference Source
public class | source

ResponseAction

Extends:

Action → ResponseAction

Example:

import { ResponseAction } from 'remote-protocol';

const action = new ResponseAction(requestId, value, false);

Constructor Summary

Public Constructor
public

constructor(requestId: *, value: *, rejected: boolean)

Create a response for an executed action.

Member Summary

Public Members
public

True if the given value thrown while executing the requested action

public

The request id

public

value: *

The given response value or error

Method Summary

Public Methods
public

exec(session: *)

public

fetch(session: *): *

public

Inherited Summary

From class Action
public

exec(session: Session): undefined | Promise

Execute the action.

public

fetch(session: Session): *

Fetch the action value.

public

Returns an arguments list for creating this instance remotely.

public

Get a string that represent this class.

Public Constructors

public constructor(requestId: *, value: *, rejected: boolean) source

Create a response for an executed action.

Params:

NameTypeAttributeDescription
requestId *

The request id

value *

The given response value or error to fetch

rejected boolean

True if the given value should be thrown when fetching this action

Public Members

public rejected: boolean source

True if the given value thrown while executing the requested action

public requestId: * source

The request id

public value: * source

The given response value or error

Public Methods

public exec(session: *) source

Execute the action.

Override:

Action#exec

Params:

NameTypeAttributeDescription
session *

public fetch(session: *): * source

Fetch the action value.

Override:

Action#fetch

Params:

NameTypeAttributeDescription
session *

Return:

*

public toArgumentsList(): undefined[] source

Returns an arguments list for creating this instance remotely.

Override:

Action#toArgumentsList

Return:

undefined[]