Packagech.capi.net.policies
Classpublic class DefaultContextPolicy
InheritanceDefaultContextPolicy Inheritance Object
Implements IContextPolicy

Default implementation of a IContextPolicy.

See also

DomainUtils


Public Properties
 PropertyDefined By
  bufferTime : Number = 1000
The number of milliseconds to preload a streaming sound in a buffer before the sound starts to stream.
DefaultContextPolicy
  checkPolicyFile : Boolean = false
Specifies whether the application should try to download a URL policy file.
DefaultContextPolicy
  defaultAppDomainPolicy : String
Defines the behavior to create the ApplicationDomain.
DefaultContextPolicy
  defaultSecDomainPolicy : String
Defines the behavior to use the SecuritDomain.
DefaultContextPolicy
Public Methods
 MethodDefined By
  
DefaultContextPolicy(defaultAppDomainPolicy:String = current, defaultSecDomainPolicy:String = none)
Creates a new DefaultContextPolicy object.
DefaultContextPolicy
  
getLoaderContext(file:ILoadableFile, appDomainPolicy:String = null, secDomainPolicy:String = null):LoaderContext
Retrieves a LoaderContext that will be attached to the specified ILoadableFile.
DefaultContextPolicy
  
getSoundContext(file:ILoadableFile):SoundLoaderContext
Retrieves a SoundLoaderContext that will be attached to the specified ILoadableFile.
DefaultContextPolicy
Property Detail
bufferTimeproperty
public var bufferTime:Number = 1000

The number of milliseconds to preload a streaming sound in a buffer before the sound starts to stream. This value will be sent to the created SoundLoaderContext.

checkPolicyFileproperty 
public var checkPolicyFile:Boolean = false

Specifies whether the application should try to download a URL policy file. This value will be sent to the created LoaderContext/SoundLoaderContext objects.

defaultAppDomainPolicyproperty 
defaultAppDomainPolicy:String  [read-write]

Defines the behavior to create the ApplicationDomain. This value can be one of the following constants : DomainUtils.APPDOMAIN_NONE, DomainUtils.APPDOMAIN_CREATE, DomainUtils.APPDOMAIN_CHILD or DomainUtils.APPDOMAIN_CURRENT.


Implementation
    public function get defaultAppDomainPolicy():String
    public function set defaultAppDomainPolicy(value:String):void

See also

defaultSecDomainPolicyproperty 
defaultSecDomainPolicy:String  [read-write]

Defines the behavior to use the SecuritDomain. This value can be one of the following constants : DomainUtils.SECDOMAIN_CURRENT or DomainUtils.SECDOMAIN_NONE.


Implementation
    public function get defaultSecDomainPolicy():String
    public function set defaultSecDomainPolicy(value:String):void

See also

Constructor Detail
DefaultContextPolicy()Constructor
public function DefaultContextPolicy(defaultAppDomainPolicy:String = current, defaultSecDomainPolicy:String = none)

Creates a new DefaultContextPolicy object.

Parameters
defaultAppDomainPolicy:String (default = current) — Defines how the ApplicationDomain must be created.
 
defaultSecDomainPolicy:String (default = none)
Method Detail
getLoaderContext()method
public function getLoaderContext(file:ILoadableFile, appDomainPolicy:String = null, secDomainPolicy:String = null):LoaderContext

Retrieves a LoaderContext that will be attached to the specified ILoadableFile.

Parameters

file:ILoadableFile — The ILoadableFile.
 
appDomainPolicy:String (default = null) — The policy to retrieve the ApplicationDomain. If null, then, the defaultAppDomainPolicy will be used.
 
secDomainPolicy:String (default = null) — The policy to retrieve the SecurityDomain. If null, then the defaultSecDomainPolicy will be used.

Returns
LoaderContext — The created LoaderContext.

See also

getSoundContext()method 
public function getSoundContext(file:ILoadableFile):SoundLoaderContext

Retrieves a SoundLoaderContext that will be attached to the specified ILoadableFile.

Parameters

file:ILoadableFile — The ILoadableFile.

Returns
SoundLoaderContext — The created SoundLoaderContext.