Package | org.spicefactory.parsley.core.scope |
Interface | public interface ScopeManager |
Implementors | DefaultScopeManager |
Scopes allow to create segments in your application where application messages or lifecycle listeners are only effective for a particular scope, which in turn may span multiple Contexts.
Method | Defined By | ||
---|---|---|---|
dispatchMessage(message:Object, selector:*):void
Dispatches a message through all scopes managed by this instance. | ScopeManager | ||
getAllScopes():Array
Returns all scope instances managed by this instance. | ScopeManager | ||
Returns the scope instance for the specified scope name. | ScopeManager | ||
hasScope(name:String):Boolean
Indicates whether this manager contains a scope with the specified name. | ScopeManager | ||
observeCommand(command:ObservableCommand):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. | ScopeManager |
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.
ReturnsArray — 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
|
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
|
Boolean — true if this manager contains a scope with the specified name
|
observeCommand | () | method |
public function observeCommand(command:ObservableCommand):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:ObservableCommand — the command to observe
|