Example
GitHub
Preparing search index...
The search index is not available
ic-reactor
ic-reactor
core
classes
ActorManager
Class ActorManager<A>
Type Parameters
A
=
types
.
BaseActor
Index
Constructors
constructor
Properties
_actor
_idl
Factory
_agent
Manager
_unsubscribe
Agent
_subscribers
canister
Id
actor
Store
visit
Function
method
Attributes
get
State
subscribe
Actor
State
set
State
Accessors
agent
Manager
Methods
update
State
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
initialize
Actor
_get
Actor
Method
call
Method
call
Method
With
Options
call
get
Actor
cleanup
Constructors
constructor
new
Actor
Manager
<
A
>
(
actorConfig
)
:
classes
.
ActorManager
<
A
>
Type Parameters
A
=
types
.
BaseActor
Parameters
actorConfig
:
types
.
ActorManagerParameters
Returns
classes
.
ActorManager
<
A
>
Properties
Private
_actor
_actor
:
null
|
A
= null
Private
_idl
Factory
_idl
Factory
:
types
.
IDL
.
InterfaceFactory
Private
_agent
Manager
_agent
Manager
:
classes
.
AgentManager
Private
_unsubscribe
Agent
_unsubscribe
Agent
:
(
(
)
=>
void
)
Type declaration
(
)
:
void
Returns
void
Private
_subscribers
_subscribers
:
(
(
)
=>
void
)
[]
= []
Type declaration
(
)
:
void
Returns
void
canister
Id
canister
Id
:
string
actor
Store
actor
Store
:
types
.
ActorStore
<
A
>
visit
Function
visit
Function
:
types
.
VisitService
<
A
>
method
Attributes
method
Attributes
:
types
.
MethodAttributes
<
A
>
get
State
get
State
:
(
(
)
=>
types
.
ActorState
<
A
>
)
= ...
Type declaration
(
)
:
types
.
ActorState
<
A
>
Returns
types
.
ActorState
<
A
>
subscribe
Actor
State
subscribe
Actor
State
:
(
(
listener
)
=>
(
(
)
=>
void
)
)
= ...
Type declaration
(
listener
)
:
(
(
)
=>
void
)
Parameters
listener
:
(
(
state
,
prevState
)
=>
void
)
(
state
,
prevState
)
:
void
Parameters
state
:
types
.
ActorState
<
A
>
prevState
:
types
.
ActorState
<
A
>
Returns
void
Returns
(
(
)
=>
void
)
(
)
:
void
Returns
void
set
State
set
State
:
NamedSet
<
types
.
ActorState
<
A
>
>
= ...
Accessors
agent
Manager
get
agentManager
(
)
:
classes
.
AgentManager
Returns
classes
.
AgentManager
Methods
Private
update
State
update
State
(
newState
,
action
?
)
:
void
Parameters
newState
:
Partial
<
types
.
ActorState
<
A
>
>
Optional
action
:
string
Returns
void
update
Method
State
update
Method
State
(
method
,
hash
,
newState
)
:
void
Parameters
method
:
Extract
<
keyof
A
,
string
>
hash
:
string
newState
:
Partial
<
{
data
:
undefined
|
types
.
ActorMethodReturnType
<
A
[
Extract
<
keyof
A
,
string
>
]
>
;
loading
:
boolean
;
error
:
undefined
|
Error
;
}
>
Returns
void
initialize
initialize
(
options
?
)
:
Promise
<
void
>
Parameters
Optional
options
:
types
.
UpdateAgentParameters
Returns
Promise
<
void
>
extract
Interface
extract
Interface
(
)
:
types
.
IDL
.
ServiceClass
Returns
types
.
IDL
.
ServiceClass
extract
Method
Attributes
extract
Method
Attributes
(
)
:
types
.
MethodAttributes
<
A
>
Returns
types
.
MethodAttributes
<
A
>
extract
Visitor
extract
Visitor
(
)
:
types
.
VisitService
<
A
>
Returns
types
.
VisitService
<
A
>
Private
initialize
Actor
initialize
Actor
(
agent
)
:
void
Parameters
agent
:
types
.
HttpAgent
Returns
void
Private
_get
Actor
Method
_get
Actor
Method
<
M
>
(
functionName
)
:
types
.
ActorMethodType
<
A
,
M
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
Returns
types
.
ActorMethodType
<
A
,
M
>
call
Method
call
Method
<
M
>
(
functionName
,
...
args
)
:
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
Rest
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
Returns
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
call
Method
With
Options
call
Method
With
Options
(
options
)
:
(
<
M
>
(
functionName
,
...
args
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
)
Parameters
options
:
utils
.
agent
.
CallConfig
Returns
(
<
M
>
(
functionName
,
...
args
)
=>
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
)
<
M
>
(
functionName
,
...
args
)
:
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
Rest
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
Returns
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
call
call
<
M
>
(
functionName
,
...
args
)
:
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
Type Parameters
M
extends
string
Parameters
functionName
:
M
Rest
...
args
:
types
.
ActorMethodParameters
<
A
[
M
]
>
Returns
Promise
<
types
.
ActorMethodReturnType
<
A
[
M
]
>
>
get
Actor
get
Actor
(
)
:
null
|
A
Returns
null
|
A
cleanup
cleanup
(
)
:
void
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
_actor
_idl
Factory
_agent
Manager
_unsubscribe
Agent
_subscribers
canister
Id
actor
Store
visit
Function
method
Attributes
get
State
subscribe
Actor
State
set
State
agent
Manager
update
State
update
Method
State
initialize
extract
Interface
extract
Method
Attributes
extract
Visitor
initialize
Actor
_get
Actor
Method
call
Method
call
Method
With
Options
call
get
Actor
cleanup
ic-reactor
Loading...