org.objectweb.kilim.model
Interface RuntimeSource

All Superinterfaces:
RuntimeElement
All Known Implementing Classes:
ComponentFactory.RTEventSource, RtComponent, RtComponentInterface, RtComponentSource

public interface RuntimeSource
extends RuntimeElement

Author:
horn

Method Summary
 void addInterfaceListener(RtCollectionPort aInterface)
          adds a new listener to the value source.
 boolean checkValue(java.util.Stack exclude)
          returns whether a value can be obtained without having to create new objects
 java.lang.Object getEventSourceValue()
          Method gets the EventSourceValue.
 RuntimeElement getTarget()
          returns the target element.
 java.lang.Object getValue()
          Method getValue.
 boolean hasValue()
          returns whether the source has a value.
 boolean isEventSource()
          returns whether the source is an event source..
 void removeInterfaceListener(RtCollectionPort aInterface)
          removes a listener from the value source.
 void setEventSourceValue(java.lang.Object aValue)
          sets the EventSourceValue.
 

Method Detail

getValue

public java.lang.Object getValue()
                          throws KilimException
Method getValue.

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 on illegal elements.

hasValue

public boolean hasValue()
                 throws KilimException
returns whether the source has a value. The behaviour depends on the nature of the source. It always returns false when invoked on tagged providers, for example.

Returns:
boolean
Throws:
KilimException - :

checkValue

public boolean checkValue(java.util.Stack exclude)
                   throws KilimException
returns whether a value can be obtained without having to create new objects

Parameters:
exclude - : the exclude stack contains objects beiing in the process of being built.
Returns:
boolean
Throws:
KilimException - :

getTarget

public RuntimeElement getTarget()
                         throws KilimException
returns the target element. This method has been introduced to deal with provider references.

Returns:
RuntimeElement
Throws:
KilimException - : generated when applied to an uninitialized provider reference.

addInterfaceListener

public void addInterfaceListener(RtCollectionPort aInterface)
                          throws KilimException
adds a new listener to the value source.

Parameters:
aInterface - : the collection port to be added to the list of listeners.
Throws:
KilimException - : the exception is generated when the method is invoked on unbound references or on illegal elements.

removeInterfaceListener

public void removeInterfaceListener(RtCollectionPort aInterface)
                             throws KilimException
removes a listener from the value source.

Parameters:
aInterface - : the collection port to be removed from the list of listeners.
Throws:
KilimException - : the exception is generated when the method is invoked on unbound references or on illegal elements.

isEventSource

public boolean isEventSource()
returns whether the source is an event source..

Returns:
boolean : is true when the source is the current event source.

setEventSourceValue

public void setEventSourceValue(java.lang.Object aValue)
                         throws KilimException
sets the EventSourceValue.

Parameters:
aValue - :
Throws:
KilimException - : the exception is generated when the method is invoked on unbound references or on illegal elements.

getEventSourceValue

public java.lang.Object getEventSourceValue()
                                     throws KilimException
Method gets the EventSourceValue.

Returns:
Object
Throws:
KilimException - : the exception is generated when the method is invoked on unbound references or on illegal elements.