Package com.mi.rs
Interface public interface IStateData
Implementors StateData

This interface encapsulates the data that is used by the RealityServer state handlers to decide which state commands are processed in. The state data can be specified when adding commands directly to the service, or when regstering a process commands callback. All commands added in a specific callback will operate in the same state. A default state data can also be set on the service itself. This state will then be used for all commands where an explicit state data has not been specified.

States is an optional RealityServer mechanism that can be used to control the scope in which RealityServer commands are executed and how URL paths are mapped to the content root among other things. The state handler is a customizable server side component that decides the state commands should be executed in based on the data specified by this interface.

Note to implementing classes: The IStateData interface is designed to be constant. A new IStateData instance must be created and used if the state data needs to change.



Public Properties
  Property Defined By
    parameters : Object
[read-only] The state parameters as an associative array, or null if no parameters are specified.
IStateData
    path : String
[read-only] The state path, or null if no path is specified.
IStateData
    stateCommands : Array
[read-only] An array of commands that are always executed before the commands added by callbacks within an execution context on the server.
IStateData
Property Detail
parameters property
parameters:Object  [read-only]

The state parameters as an associative array, or null if no parameters are specified.


Implementation
    public function get parameters():Object
path property  
path:String  [read-only]

The state path, or null if no path is specified.


Implementation
    public function get path():String
stateCommands property  
stateCommands:Array  [read-only]

An array of commands that are always executed before the commands added by callbacks within an execution context on the server. Examples of a command that can be used is the "use_scope". Adding this command will make sure that the current scope is changed and affects all commands that are executed in the context of this state data.


Implementation
    public function get stateCommands():Array