Client
Hierarchy
StatefulMixin
↳ Client
Implements
- Stateful
- Stateful
Index
Constructors
Properties
Methods
Object literals
Constructors
constructor
+ new Client(props?
: Props): Client
Creates an instance of Client. Creates an instance of Client.
remarks
Since were dealing with special cases, mixins and limits of TypeScript, we
use of "invoking multiple base constructors" from polytype to pass props to Struct's
constructor:
https://www.npmjs.com/package/polytype#invoking-multiple-base-constructors
remarks
Since were dealing with special cases, mixins and limits of TypeScript, we
use of "invoking multiple base constructors" from polytype to pass props to Struct's
constructor:
https://www.npmjs.com/package/polytype#invoking-multiple-base-constructors
Parameters:
Name | Type | Description |
---|---|---|
props? | Props | Properties of the type required for construction. |
Returns: Client
Properties
id
• id: string | Guid
state
• state: State
Implementation of Stateful.state
Overrides StatefulMixin.state
Methods
getId
▸ getId(): string | Guid
Returns client identifier.
Returns: string | Guid
Client's identifier.
getSelectableStates
▸ getSelectableStates(): Record‹string, State›
Implementation of Stateful
Inherited from StatefulMixin.getSelectableStates
Overrides Task.getSelectableStates
Returns: Record‹string, State›
getState
▸ getState(): State
Implementation of Stateful
Inherited from StatefulMixin.getState
Returns: State
hasState
▸ hasState(): boolean
Implementation of Stateful
Inherited from StatefulMixin.hasState
Returns: boolean
isInOneOfStates
▸ isInOneOfStates(states
: State | State[]): boolean
Implementation of Stateful
Inherited from StatefulMixin.isInOneOfStates
Overrides Task.isInOneOfStates
Parameters:
Name | Type |
---|---|
states | State | State[] |
Returns: boolean
isInState
▸ isInState(state
: State | State[]): boolean
Implementation of Stateful
Inherited from StatefulMixin.isInState
Parameters:
Name | Type |
---|---|
state | State | State[] |
Returns: boolean
setState
▸ setState(state
: State): void
Implementation of Stateful
Inherited from StatefulMixin.setState
Parameters:
Name | Type |
---|---|
state | State |
Returns: void
validateState
▸ validateState(stateOrStates
: State | State[], error?
: Error): boolean
Implementation of Stateful
Inherited from StatefulMixin.validateState
Overrides Task.validateState
Parameters:
Name | Type |
---|---|
stateOrStates | State | State[] |
error? | Error |
Returns: boolean
Object literals
Static
STATES
▪ STATES: object
connected
• connected: string = "connected"
constructed
• constructed: string = "constructed"
disconnected
• disconnected: string = "disconnected"
failed
• failed: string = "failed"
initialized
• initialized: string = "initialized"
paused
• paused: string = "paused"
stopped
• stopped: string = "stopped"