Package | com.mi.rs |
Class | public class BatchCommand |
Inheritance | BatchCommand ![]() |
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.
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
BatchCommand(continueOnError:Boolean = true)
Constructs a batch command.
|
BatchCommand | ||
addCommand(cmd:ICommand):void
Adds a command to the batch.
|
BatchCommand |
commands | property |
commands:Array
[read-only]
The array containing the sub-commands of this batch command.
public function get commands():Array
continueOnError | property |
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.
public function get continueOnError():Boolean
public function set continueOnError(value:Boolean):void
isCancelled | property |
isCancelled:Boolean
[read-only]
Always returns false.
public function get isCancelled():Boolean
name | property |
name:String
[read-only]
The name of the batch RealityServer command.
public function get name():String
params | property |
params:Object
[read-only]
Returns an object containing the batch command parameters.
public function get params():Object
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.
|
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.
|