Packageorg.spicefactory.parsley.core.scope.impl
Classpublic class DefaultScopeManager
InheritanceDefaultScopeManager Inheritance Object
Implements ScopeManager, InitializingService

Default implementation of the ScopeManager interface.



Public Methods
 MethodDefined By
  
dispatchMessage(message:Object, selector:*):void
Dispatches a message through all scopes managed by this instance.
DefaultScopeManager
  
getAllScopes():Array
Returns all scope instances managed by this instance.
DefaultScopeManager
  
getScope(name:String = null):Scope
Returns the scope instance for the specified scope name.
DefaultScopeManager
  
hasScope(name:String):Boolean
Indicates whether this manager contains a scope with the specified name.
DefaultScopeManager
  
init(info:BootstrapInfo):void
Invoked once after the service has been instantiated.
DefaultScopeManager
  
observeCommand(command:Command):void
Observes the specified command and dispatches messages to registered observers of all scopes managed by this instance when the state of the command changes.
DefaultScopeManager
Method Detail
dispatchMessage()method
public function dispatchMessage(message:Object, selector:*):void

Dispatches a message through all scopes managed by this instance. In many cases you'll want to dispatch application messages through all scopes so that the receiving side can decide which scope it wants to listen for.

Parameters

message:Object — the message to dispatch
 
selector:* (default = NaN) — the selector to use if it cannot be determined from the message instance itself

getAllScopes()method 
public function getAllScopes():Array

Returns all scope instances managed by this instance.

Returns
Array — all scope instances managed by this instance
getScope()method 
public function getScope(name:String = null):Scope

Returns the scope instance for the specified scope name. If the scope name is omitted, the default receiver scope is returned.

Parameters

name:String (default = null) — the name of the scope to look for

Returns
Scope — the Scope instance for the specified name
hasScope()method 
public function hasScope(name:String):Boolean

Indicates whether this manager contains a scope with the specified name.

Parameters

name:String — the name of the scope to look for

Returns
Boolean — true if this manager contains a scope with the specified name
init()method 
public function init(info:BootstrapInfo):void

Invoked once after the service has been instantiated. The BootstrapInfo instance passed to this method gives access to the settings and collaborating services.

Parameters

info:BootstrapInfo — the environment of the Context building process

observeCommand()method 
public function observeCommand(command:Command):void

Observes the specified command and dispatches messages to registered observers of all scopes managed by this instance when the state of the command changes.

Parameters

command:Command — the command to observe