|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.kilim.model.RtComponentElement
org.objectweb.kilim.model.RtComponent
| Field Summary | |
private TemplateDescription |
containingTemplate
|
private java.util.HashMap |
controllers
|
private ComponentFactory |
factory
|
private InstanciationMger |
instanciationMger
|
private java.util.List |
interfaces
|
private boolean |
isForkedComponent
|
private boolean |
isInitialized
|
private java.util.List |
nAryListeners
|
private java.util.List |
plugTos
|
private java.util.List |
slots
|
private java.util.List |
subComponents
|
private TemplateDescription |
template
|
| Fields inherited from class org.objectweb.kilim.model.RtComponentElement |
nbComponent, nbElement |
| Constructor Summary | |
RtComponent(Instance aInstance,
Component aComponent,
ComponentFactory aFactory)
The public constructor for RtComponents. |
|
| Method Summary | |
void |
addController(java.lang.String aName,
java.lang.Object aController)
This method is an extension introduced to ease the mapping with the FRACTAL model : a controller is a technical object internally used by the component (most controllers are used as instantiation managers or communication managers) according to its specific semantics. |
void |
addInterface(ComponentInterface aElement)
adds a new interface in the component. |
void |
addInterfaceListener(RtCollectionPort aInterface)
adds a new listener to the value source. |
void |
addPlugTo(ComponentSlot aSlot)
This method is used to register slots in which the component is plugged to. |
void |
addSlot(ComponentSlot aSlot)
adds a new slot to a component. |
void |
addSubComponent(Component aElement)
adds a component as a subcomponent of the current component. |
boolean |
checkValue(java.util.Stack exclude)
returns whether a value can be obtained without having to create new objects |
Component |
fork()
creates a copy of the component as defined in the template. |
java.lang.Object |
getController(java.lang.String aName)
This method is an extension introduced to ease the mapping with the FRACTAL model : a controller is a technical object internally used by the component (most controllers are used as instantiation managers or communication managers) according to its specific semantics. |
java.util.Iterator |
getControllers()
This method is an extension introduced to ease the mapping with the FRACTAL model : a controller is a technical object internally used by the component (most controllers are used as instantiation managers or communication managers) according to its specific semantics. |
java.lang.Object |
getEventSourceValue()
Method gets the EventSourceValue. |
Factory |
getFactory()
returns the factory used to create the container. |
InstanciationMger |
getInstanciationMger()
Method getInstanciationMger returns the instanciation manager to be used the component. |
InstanciationMger |
getInstanciationMgerFromConfiguration()
sets the instanciation manager from the instanciation strategy defined in the class KilimConfiguration KilimConfiguration |
ComponentInterface |
getInterface(java.lang.String aName)
returns an interface defined in the component |
java.util.Iterator |
getInterfaceListeners()
returns as an interator the interface the interface listeners. |
java.util.Iterator |
getInterfaces()
returns as an iterator the interfaces defined in the component. |
java.lang.String |
getLocalName()
returns the local name of the component element. |
java.util.Iterator |
getPlugTos()
returns as an iterator the slots the component is plugged into. |
ComponentSlot |
getSlot(java.lang.String aName)
returns a slot from its local name. |
java.util.Iterator |
getSlots()
returns as an iterator the slots declared in the component. |
Component |
getSubComponent(java.lang.String aName)
returns a subcomponent from its local name This method is not recursive and only looks for direct sub component. |
java.util.Iterator |
getSubComponents()
returns as an iterator the direct subcomponents (i.e. |
TemplateDescription |
getTemplate()
returns the template describing the component. |
java.lang.Object |
getValue()
Method getValue. |
boolean |
hasValue()
returns whether the source has a value. |
boolean |
isComponent()
returns true if the container is a component. |
boolean |
isEventSource()
returns whether the source is an event source.. |
private boolean |
isForkedComponent()
|
private void |
isForkedComponent(boolean iFE)
|
boolean |
isInitialized()
returns true when the container is in the "initialized" state or not. |
boolean |
isSlot()
returns true if the container is a slot. |
void |
plug(java.lang.String aName,
Component aComponent)
plugs a component in a slot defined in the current component. |
void |
release()
releases a component by (1) removing it as a subcomponent of its containing component, (2) unpluging it from all slots it is plugged in, (3) removing its naming context from parent context and factory from parent factory. |
void |
removeController(java.lang.String aName)
This method is an extension introduced to ease the mapping with the FRACTAL model : a controller is a technical object internally used by the component (most controllers are used as instantiation managers or communication managers) according to its specific semantics. |
void |
removeInterface(ComponentInterface aElement)
removes the interface from a component. |
void |
removeInterfaceListener(RtCollectionPort aInterface)
removes a listener from the value source. |
void |
removePlugTo(ComponentSlot aSlot)
This method is used to unregister slots in which the component is plugged to. |
void |
removeSlot(java.lang.String aName)
removes a slot from a component. |
void |
removeSubComponent(Component aElement)
removes a component from the current component. |
void |
removeSubComponent(java.lang.String aName)
removes the subcomponent from the current component. |
void |
setEventSourceValue(java.lang.Object aValue)
sets the EventSourceValue. |
void |
setInitialized()
sets the container in the"initialized" state. |
void |
setInstanciationMger(InstanciationMger aMger)
sets the instanciation manager to be used for the component. |
void |
setTemplate(TemplateDescription aTemplate)
|
java.lang.String |
toString()
|
void |
unplug(java.lang.String aName,
Component aComponent)
unplugs a component from a slot defined in the current component. |
| Methods inherited from class org.objectweb.kilim.model.RtComponentElement |
containsElement, getContainingComponent, getContainingElement, getElement, getElementDescription, getNbComponent, getNbElement, getQualifiedName, getTarget, getTemplateDefHierarchy, removeElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.objectweb.kilim.model.ComponentElement |
getContainingComponent, getContainingElement, getElementDescription, getQualifiedName, getTemplateDefHierarchy |
| Methods inherited from interface org.objectweb.kilim.model.RuntimeSource |
getTarget |
| Field Detail |
private boolean isInitialized
private boolean isForkedComponent
private ComponentFactory factory
private TemplateDescription template
private TemplateDescription containingTemplate
private InstanciationMger instanciationMger
private java.util.List subComponents
private java.util.List interfaces
private java.util.List slots
private java.util.List plugTos
private java.util.List nAryListeners
private java.util.HashMap controllers
| Constructor Detail |
public RtComponent(Instance aInstance,
Component aComponent,
ComponentFactory aFactory)
throws KilimException
aInstance - : the template element corresponding to an instanceaComponent - : the containing componentaFactory - : the factoy used to create the component.
KilimException - : generated when aInstance is null.| Method Detail |
public boolean isComponent()
ContainerElement
isComponent in interface ContainerElementContainerElement.isComponent()public boolean isSlot()
ContainerElement
isSlot in interface ContainerElementContainerElement.isSlot()public java.lang.String getLocalName()
ComponentElement
getLocalName in interface ComponentElementComponentElement.getLocalName()
public boolean hasValue()
throws KilimException
RuntimeSource
hasValue in interface RuntimeSourceKilimException - :org.objectweb.kilim.model.RuntimeSource#checkValue()
public boolean checkValue(java.util.Stack exclude)
throws KilimException
RuntimeSource
checkValue in interface RuntimeSourceexclude - : the exclude stack contains objects beiing in the process of being built.
KilimException - :RuntimeSource.checkValue(Stack)
public void addInterface(ComponentInterface aElement)
throws KilimException
addInterface in interface ContainerElementaElement - : the interface
KilimException - : generated if aElement is null or if the local name of aElement clashes with the local name of another interface.
public void removeInterface(ComponentInterface aElement)
throws KilimException
removeInterface in interface ContainerElementaElement - : the interface to be removed
KilimException - : generated if aElement is null, if the component has no interface or if the interface is not defined in the componentpublic ComponentInterface getInterface(java.lang.String aName)
getInterface in interface ContainerElementaName - : the local name of the interface.
public java.util.Iterator getInterfaces()
getInterfaces in interface ContainerElementpublic Factory getFactory()
ContainerElement
getFactory in interface ContainerElementContainerElement.getFactory()public TemplateDescription getTemplate()
Component
getTemplate in interface ComponentInstance.getTemplate()public void setTemplate(TemplateDescription aTemplate)
org.objectweb.kilim.description.Instance#setTemplate(Template)public java.lang.String toString()
Object.toString()
public void addSubComponent(Component aElement)
throws KilimException
addSubComponent in interface ComponentaElement - : the subcomponent.
KilimException - : generated if aElement is null or if it is already defined as a subcomponent in the component.
public void removeSubComponent(java.lang.String aName)
throws KilimException
removeSubComponent in interface ComponentaName - : the name of the child component to be removed.
KilimException - : generated if aName is null or is unknown (i.e. it is not a the name of a child component)
public void removeSubComponent(Component aElement)
throws KilimException
removeSubComponent in interface ComponentaElement - : the component to be removed.
KilimException - : generated if aElement is null, if the component does not contain any subcomponent,
if aElement is not a subcomponent of the current component.public Component getSubComponent(java.lang.String aName)
getSubComponent in interface ComponentaName - : the local name of the subcomponent.
public java.util.Iterator getSubComponents()
getSubComponents in interface Component
public void addSlot(ComponentSlot aSlot)
throws KilimException
aSlot - : the slot to be added
KilimException - : generated if aSlot is null.
public void removeSlot(java.lang.String aName)
throws KilimException
aName - : the name of the slot to be removed.
KilimException - : generated if aName is null, if the component does not contain slots or
if it does not contain a slot whose name is aName
public ComponentSlot getSlot(java.lang.String aName)
throws KilimException
getSlot in interface ComponentaName - : the local name of the slot.
KilimException - : generated if aName is null, if the component does not contain slots or
if it does not contain a slot whose name is aNamepublic java.util.Iterator getSlots()
getSlots in interface Component
public void addPlugTo(ComponentSlot aSlot)
throws KilimException
aSlot - : the slot to be register.
KilimException - : generated if aSlot is null or if the component is already registered as a components' plugTo..
public void removePlugTo(ComponentSlot aSlot)
throws KilimException
aSlot - : the slot to be removed.
KilimException - : generated if aSlot is null or if the component is not plugged in aSlot.public java.util.Iterator getPlugTos()
Component
getPlugTos in interface ComponentComponent.getPlugTos()
public void plug(java.lang.String aName,
Component aComponent)
throws KilimException
plug in interface ComponentaName - : the local name of the slot.aComponent - : the component to be plugged.
KilimException - : generated if aName is null, if aName is not the local name of a slot defined in the component or if aComponent is null.
public void unplug(java.lang.String aName,
Component aComponent)
throws KilimException
unplug in interface ComponentaName - : the local name of the slot.aComponent - : the component to be plugged.
KilimException - : generated if aName is null, if aName is not the local name of a slot defined in the component or if aComponent is null.public java.lang.Object getValue()
RuntimeSource
getValue in interface RuntimeSourceorg.objectweb.kilim.model.RuntimeSource#getValue(RuntimeContext)
public void setEventSourceValue(java.lang.Object aValue)
throws KilimException
RuntimeSource
setEventSourceValue in interface RuntimeSourceaValue - :
KilimException - : the exception is generated when the method is invoked on unbound references
or on illegal elements.org.objectweb.kilim.model.RuntimeSource#setEventSource(Object)
public java.lang.Object getEventSourceValue()
throws KilimException
RuntimeSource
getEventSourceValue in interface RuntimeSourceKilimException - : the exception is generated when the method is invoked on unbound references
or on illegal elements.org.objectweb.kilim.model.RuntimeSource#getEventSource()public boolean isEventSource()
RuntimeSource
isEventSource in interface RuntimeSourceRuntimeSource.isEventSource()
public void addInterfaceListener(RtCollectionPort aInterface)
throws KilimException
RuntimeSource
addInterfaceListener in interface RuntimeSourceaInterface - : the collection port to be added to the list of listeners.
KilimException - : the exception is generated when the method is invoked on unbound references
or on illegal elements.org.objectweb.kilim.model.RuntimeSource#addInterfaceListener(MultipleValueInterface)
public void removeInterfaceListener(RtCollectionPort aInterface)
throws KilimException
RuntimeSource
removeInterfaceListener in interface RuntimeSourceaInterface - : the collection port to be removed from the list of listeners.
KilimException - : the exception is generated when the method is invoked on unbound references
or on illegal elements.org.objectweb.kilim.model.RuntimeSource#removeInterfaceListener(MultipleValueInterface)public java.util.Iterator getInterfaceListeners()
public Component fork()
throws KilimException
fork in interface ComponentKilimException - : generated when invoked on a component having no factory (should not be a KilimException but an InternalException FHO !!!)public boolean isInitialized()
ContainerElement
isInitialized in interface ContainerElementContainerElement.isInitialized()public void setInitialized()
ContainerElement
setInitialized in interface ContainerElementorg.objectweb.kilim.model.Component#setInitialized(boolean)private boolean isForkedComponent()
private void isForkedComponent(boolean iFE)
public InstanciationMger getInstanciationMgerFromConfiguration()
throws KilimException
ComponentKilimConfiguration
getInstanciationMgerFromConfiguration in interface ComponentKilimException - :Component.getInstanciationMgerFromConfiguration()public InstanciationMger getInstanciationMger()
Component
getInstanciationMger in interface ComponentComponent.getInstanciationMger()
public void setInstanciationMger(InstanciationMger aMger)
throws KilimException
Component
setInstanciationMger in interface ComponentaMger - : the instanciation manager to be used
KilimException - :Component.setInstanciationMger(InstanciationMger)
public void release()
throws KilimException
Component
release in interface ComponentKilimException - :Component.release()
public void addController(java.lang.String aName,
java.lang.Object aController)
throws KilimException
addController in interface ComponentaName - : the local name of the controller.aController - : the controller.
KilimException - : generated if aName or aController is null.
public void removeController(java.lang.String aName)
throws KilimException
removeController in interface ComponentaName - : the local name of the controller.
KilimException - : generated if aName is null or if the controller is not defined in the component.
public java.lang.Object getController(java.lang.String aName)
throws KilimException
getController in interface ComponentaName - : the name of the controller
KilimException - : generated if aName is null or if the controller is not defined in the component.public java.util.Iterator getControllers()
getControllers in interface Component
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||