Package | org.spicefactory.parsley.core.messaging.impl |
Class | public class DefaultMessageReceiverCache |
Inheritance | DefaultMessageReceiverCache Object |
Implements | MessageReceiverCache |
Method | Defined By | ||
---|---|---|---|
DefaultMessageReceiverCache(type:ClassInfo, collections:Array)
Creates a new instance. | DefaultMessageReceiverCache | ||
checkNewCollection(collection:MessageReceiverCollection):void
Checks whether the specified new collection matches the message type of this cache and adds
it in that case. | DefaultMessageReceiverCache | ||
getReceivers(kind:MessageReceiverKind, selector:*):Array
Returns the receivers for the specified receiver kind and selector value. | DefaultMessageReceiverCache | ||
getSelectorValue(message:Object):*
Returns the value of the selector property of the specified message instance. | DefaultMessageReceiverCache | ||
release():void
Releases this selection cache in case it is no longer used. | DefaultMessageReceiverCache |
DefaultMessageReceiverCache | () | Constructor |
public function DefaultMessageReceiverCache(type:ClassInfo, collections:Array)
Creates a new instance.
Parameterstype:ClassInfo — the type of the message
| |
collections:Array — the collections of receivers applicable for this message type and its subtypes
|
checkNewCollection | () | method |
public function checkNewCollection(collection:MessageReceiverCollection):void
Checks whether the specified new collection matches the message type of this cache and adds it in that case.
Parameters
collection:MessageReceiverCollection — the new collection to check
|
getReceivers | () | method |
public function getReceivers(kind:MessageReceiverKind, selector:*):Array
Returns the receivers for the specified receiver kind and selector value.
Parameters
kind:MessageReceiverKind — the kind of receivers to return
| |
selector:* (default = NaN ) — the selector to use for finding matching receivers
|
Array — the receivers for the specified receiver kind and messag
|
getSelectorValue | () | method |
public function getSelectorValue(message:Object):*
Returns the value of the selector property of the specified message instance.
Parameters
message:Object — the message instance
|
* — the value of the selector property of the specified message instance
|
release | () | method |
public function release():void
Releases this selection cache in case it is no longer used. Usually only called by the framework when there is no Context left that uses the ApplicationDomain the message type of this cache belongs to.