Class: ActorProvider

ActorProvider(actornullable)

A provider of the actor that is used to associate requests to the backend with an application user.

Constructor

new ActorProvider(actornullable)

Parameters:
Name Type Attributes Description
actor UserId <nullable>
an optional actor to be used for identifying requests to the backend; if not specified, the anonymous actor is used
Source:

Classes

ActorProvider

Members

(static) ANONYMOUS :UserId

The anonymous backend actor. It is needed for requests to the backend when the particular user is undefined.
Type:
  • UserId
Source:

Methods

clear()

Sets the anonymous actor value.
Source:

get() → {UserId}

Source:
Returns:
the current actor value
Type
UserId

update(actorIdnullable)

Updates the actor ID value if it is different from the current, sets the anonymous actor value if actor ID not specified or `null`.
Parameters:
Name Type Attributes Description
actorId UserId <nullable>
Source:

(static) _ensureUserId(object)

Ensures if the object extends UserId. The implementation doesn't use `instanceof` check and check on prototypes since they may fail if different versions of the file are used at the same time (e.g. bundled and the original one).
Parameters:
Name Type Description
object the object to check
Source: