mirror of
https://github.com/aurora-opensource/xviz.git
synced 2026-01-18 14:07:46 +00:00
Proper module to replace our adhoc server script with a structured middleware-based implementation. Key documents are: - RFC ./dev-docs/004-server-module-rfc.md - User Docs ./docs/api-reference/server - Module Readme ./modules/server/README.md
1.3 KiB
1.3 KiB
XVIZSessionContext
This object provides state used during an XVIZSession to the middleware components.
It also serves as a store for any such component to save state if is needs to do so for the duration of the session. XVIZ Providers encapsulate the details of reading a particular XVIZ source and returns an object that allows you to access metadata and iterate over the XVIZ messages.
Constructor
XVIZSessionContext(state)
Parameters:
state(Object) - Initial state
Methods
set(name, val)
Save state in the context.
Parameters:
name(string) - Key to save state underval(Any) - Data to store in the context
get(name)
Access saved state
Parameters:
name(string) - Key used to save state
Returns: (Any) - previously saved state
startTransform(id, state)
Initial tracking state for a transform request in flight
Parameters:
id(string) - Identifier for this transform requeststate(Object) - State associated with this transform object
transform(id)
Access to saved transform state
Parameters:
id(string) - Identifier used to save transform state
Returns: (Object) - state previously saved
endTransform(id)
Removal of transform state
Parameters:
id(string) - Identifier for transform state to be removed