WebConnect

The LocalStorage class encapsulates the access to data objects.

Import
the javascript logo
import { WebConnect } from "@schukai/monster/source/data/datasource/server/webconnect.mjs";
Source
the git logo
Package
the npm logo
Since
3.1.0

Exported

WebConnect

Derived from

Server

Options

The Options listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the Server.

Option
Type
Default
Description
url
string
undefined
source that you wish to fetch.
object
connection
connection.timeout
object
5000
the connection.
connection.reconnect.timeout
number
1000
The timeout in milliseconds for the reconnect.
connection.reconnect.attempts
number
1
The maximum number of reconnects.
connection.reconnect.enabled
boolean
false
If the reconnect is enabled.
write
object
{}
write.mapping
object
undefined
the mapping is applied before writing.
write.mapping.transformer
string
undefined
Transformer to select the appropriate entries
write.mapping.callback
monster.data.datasource~examplecallback[]
undefined
with the help of the callback, the structures can be adjusted before writing.
object
write.sheathing
write.sheathing.object
object
undefined
Object to be wrapped
write.sheathing.path
string
undefined
Path to the data
read
object
{}
read.path
string
undefined
Path to data
read.mapping
object
undefined
the mapping is applied after reading.
read.mapping.transformer
string
undefined
Transformer to select the appropriate entries
read.mapping.callback
monster.data.datasource~examplecallback[]
undefined
with the help of the callback, the structures can be adjusted after reading.

Properties

The Properties listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits Properties from these parent classes. If you cannot find a specific Properties in this list, we recommend consulting the documentation of the Server.

Methods

The methods listed in this section are defined directly within the class. This class is derived from several parent classes. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the Server.

Constructor

constructor([options])
Parameters
  • [options] {object}: options contains definitions for the datasource.

Behavioral methods

close()
Returns
  • {Promise}
This method closes the connection.

State query methods

isConnected()
Returns
  • {boolean}

Structural methods

getClone()
Returns
  • {RestAPI}

Static methods

[instanceSymbol]()
Returns
  • {symbol}
This method is called by the instanceof operator.

Other methods

connect()
Returns
  • {Promise}
read()
Returns
  • {Promise}
write()
Returns
  • {Promise}

Events

This component does not fire any public events. It may fire events that are inherited from its parent classes.

The current width of the area is too small to display the content correctly.