|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Dependency
Generic dependency for a component. A dependency can be required or not.
A dependency will be activated by the component it belongs to. The component
will call the start(Service service)
and
stop(Service service)
methods.
After it has been started, a dependency must callback
the associated component's dependencyAvailable()
and
dependencyUnavailable()
methods. State changes of the dependency itself may only be made as long as
the dependency is not 'active', meaning it is associated with a running component.
Method Summary | |
---|---|
Dependency |
createCopy()
Creates a copy of this dependency, cloning all declared state, but not the runtime state. |
Object |
getAutoConfigInstance()
Returns the instance that is injected. |
String |
getAutoConfigName()
Returns the name of the member in the class of the component instance to inject into. |
Class |
getAutoConfigType()
Returns the type of the instance that is injected. |
Dictionary |
getProperties()
|
void |
invokeAdded(DependencyService service)
Invoke the "added" callback on a required dependency. |
void |
invokeRemoved(DependencyService service)
Invoke the "removed" callback on a required dependency. |
boolean |
isAutoConfig()
Returns true>code> if auto configuration is enabled for this dependency. |
boolean |
isAvailable()
Returns true if the dependency is available. |
boolean |
isInstanceBound()
As soon as the instance is created, keep it around, even if this dependency goes away. |
boolean |
isPropagated()
|
boolean |
isRequired()
Returns true if this a required dependency. |
Method Detail |
---|
boolean isRequired()
true
if this a required dependency. Required dependencies
are dependencies that must be available before the component can be activated.
true
if the dependency is requiredboolean isAvailable()
true
if the dependency is available.
true
if the dependency is availableboolean isInstanceBound()
true
if the dependency is instance boundboolean isAutoConfig()
true>code> if auto configuration is enabled for this dependency.
Auto configuration means that a dependency is injected in the component instance
when it's available, and if it's unavailable, a "null object" will be inserted
instead.
- Returns:
true
if auto configuration is enabled for this dependency
Class getAutoConfigType()
Object getAutoConfigInstance()
String getAutoConfigName()
void invokeAdded(DependencyService service)
service
- void invokeRemoved(DependencyService service)
service
- boolean isPropagated()
Dictionary getProperties()
Dependency createCopy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |