| Package | org.spicefactory.parsley.lifecycle |
| Class | public class Observe |
| Inheritance | Observe Object |
| Method | Defined By | ||
|---|---|---|---|
apply(builder:ObjectDefinitionBuilder):void
Applies this configuration to the specified definition builder. | Observe | ||
[static]
Creates a new builder for an observer method. | Observe | ||
Sets the (optional) id of the object the observer is interested in. | Observe | ||
Sets the lifecycle phase this observer is interested in. | Observe | ||
Sets the name of the scope to observe. | Observe | ||
| apply | () | method |
public function apply(builder:ObjectDefinitionBuilder):voidApplies this configuration to the specified definition builder.
Parameters
builder:ObjectDefinitionBuilder — the builder to apply this configuration to
|
| forMethod | () | method |
public static function forMethod(method:String):ObserveCreates a new builder for an observer method.
Parameters
method:String — the method that receives the observed instance(s)
|
Observe — a new builder for an observer method
|
| objectId | () | method |
public function objectId(id:String):ObserveSets the (optional) id of the object the observer is interested in. When omitted all objects with a matching type deduced from the method parameter will be observed.
Parameters
id:String — the id of the object the observer is interested in
|
Observe — this builder for method chaining
|
| phase | () | method |
public function phase(value:Phase):Observe
Sets the lifecycle phase this observer is interested in.
The default is ObjectLifecycle.POST_INIT.
Parameters
value:Phase — the lifecycle phase this observer is interested in
|
Observe — this builder for method chaining
|
| scope | () | method |
public function scope(name:String):Observe
Sets the name of the scope to observe.
The default is ScopeName.GLOBAL.
Only matching objects created in the target scope will be considered
for invocation of the observer method.
Parameters
name:String — the name of the scope to observe
|
Observe — this builder for method chaining
|