org.objectweb.kilim.model
Interface ComponentSource
- All Superinterfaces:
- ComponentElement
- All Known Subinterfaces:
- ComponentInterface, ComponentProperty
- All Known Implementing Classes:
- RtComponentInterface, RtComponentProperty, RtSingleValuePort
- public interface ComponentSource
- extends ComponentElement
- Author:
- horn
Method Summary |
java.lang.Object |
getValue()
This method has a behaviour that depends on the exact nature of the value source. |
boolean |
hasValue()
returns whether a value has been evaluated and stored in the source. |
getValue
public java.lang.Object getValue()
throws KilimException
- This method has a behaviour that depends on the exact nature of the value source.
In case of properties, it simply returns the property value associated to it.
In case of providers, it (re)executes the corresponding method, constructor, getter, ..... and returns the (new) obtained result.
In case of unary ports two cases should be distinguished : 1) getValue() has not been previously invoked and no value is thus associated to the source.
getValue() then results in the execution of the corresponding method, constructor, getter, ...... The obtained result is stored and returned after execution
of the "bind" triggers.. 2) getValue() has been previously invoked. The stored result is returned.
- Returns:
- Object : the reference of the object provided by the source.
- Throws:
KilimException
- : the exception is generated when the method is invoked on unbound references or nary ports.
hasValue
public boolean hasValue()
throws KilimException
- returns whether a value has been evaluated and stored in the source. The behaviour of this method is
highly dependant on the real nature of the source. It always returns false when invoked on a provider.
- Returns:
- boolean
- Throws:
KilimException
- : the exception is generated when the method is invoked on unbound references or nary ports.