Packagecom.mi.rs
Classpublic class BatchCommand
InheritanceBatchCommand Inheritance Object
Implements IBatchCommand

Implementation of the IBatchCommand interface. A batch command is a special command that can have any number of sub-commands. The batch command is processed as a single command and gets only a single reply from the server. The sub-commands can't have individual response handlers, but the IResponse interface has helper methods that makes it easier to process the sub-command results of a batch command.

Batch commands can be nested, meaning that a batch command can have sub-commands that are in turn batch commands and so on. Batch commands can not contain commands that return binary data such as the "render" command.



Public Properties
 PropertyDefined By
  commands : Array
[read-only] The array containing the sub-commands of this batch command.
BatchCommand
  continueOnError : Boolean
Defines the error mode of this batch command.
BatchCommand
  isCancelled : Boolean
[read-only] Always returns false.
BatchCommand
  name : String
[read-only] The name of the batch RealityServer command.
BatchCommand
  params : Object
[read-only] Returns an object containing the batch command parameters.
BatchCommand
Public Methods
 MethodDefined By
  
BatchCommand(continueOnError:Boolean = true)
Constructs a batch command.
BatchCommand
  
Adds a command to the batch.
BatchCommand
Property Detail
commandsproperty
commands:Array  [read-only]

The array containing the sub-commands of this batch command.


Implementation
    public function get commands():Array
continueOnErrorproperty 
continueOnError:Boolean

Defines the error mode of this batch command. If true all commands in the batch will be processed regardless of if previous commands has failed. If false, the processing will halt at the first error.


Implementation
    public function get continueOnError():Boolean
    public function set continueOnError(value:Boolean):void
isCancelledproperty 
isCancelled:Boolean  [read-only]

Always returns false.


Implementation
    public function get isCancelled():Boolean
nameproperty 
name:String  [read-only]

The name of the batch RealityServer command.


Implementation
    public function get name():String
paramsproperty 
params:Object  [read-only]

Returns an object containing the batch command parameters.


Implementation
    public function get params():Object
Constructor Detail
BatchCommand()Constructor
public function BatchCommand(continueOnError:Boolean = true)

Constructs a batch command.

Parameters
continueOnError:Boolean (default = true) — If true (the default) then command processing will continue even if a command experience an error. If false the command execution will stop and any remaining commands will be aborted. Error responses are generated for aborted commands.
Method Detail
addCommand()method
public function addCommand(cmd:ICommand):void

Adds a command to the batch. Batch sub-commands will be processed in the same order they are added and their responses can be accessed from the Response object passed to a response handler of the batch command itself.

Parameters

cmd:ICommand — The command to add as a sub-command.