Packageorg.spicefactory.parsley.messaging.tag
Classpublic class ManagedEventsDecorator
InheritanceManagedEventsDecorator Inheritance Object
Implements ObjectDefinitionDecorator
Subclasses ManagedEventsDecoratorTag

Represents a Metadata, MXML or XML tag that can be used on classes that dispatch events that should be dispatched through Parsleys central message router. May only be place on classes that implement IEventDispatcher. The class definition should contain additional regular [Event] tags for all events it dispatches.



Public Properties
 PropertyDefined By
  names : Array
The event names/types of all events dispatched by the annotated class that should be managed by Parsley.
ManagedEventsDecorator
  scope : String
The scope these managed events should be dispatched to.
ManagedEventsDecorator
Public Methods
 MethodDefined By
  
Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container.
ManagedEventsDecorator
Property Detail
namesproperty
public var names:Array

The event names/types of all events dispatched by the annotated class that should be managed by Parsley.

scopeproperty 
public var scope:String

The scope these managed events should be dispatched to. If this attribute is omitted the event will be dispatched through all scopes of the corresponding Context.

Method Detail
decorate()method
public function decorate(builder:ObjectDefinitionBuilder):void

Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container. It doesn't matter whether it is a builtin configuration tag or a custom extension tag, or whether it is a metadata tag, an MXML or XML tag. As long as the tag is mapped to a class that implements this interface the container will invoke it for each tag on each object.

The builder parameter getting passed to the decorator can be used to customize the ObjectDefinition that is currently getting processed. In most custom tag implementations you will peform tasks like specifying constructor arguments, property values, message receivers, custom lifecycle processors or instantiators.

A decorator is also allowed to register additional definitions through using builder.newBuilder. Those additional definitions might describe collaborators that the processed definition will need to operate for example. If you want to register collaborators that are globally accessible (or within a certain scope) you may consider adding them to the ScopeExtensionRegistry in the GlobalFactoryRegistry instead.

Parameters

builder:ObjectDefinitionBuilder — the builder that can be used to modify the target definition