org.objectweb.kilim.model.instanciation
Class InstanciationMger

java.lang.Object
  extended byorg.objectweb.kilim.model.instanciation.InstanciationMger
Direct Known Subclasses:
BDUInstanciationMger, NullInstanciationMger

public abstract class InstanciationMger
extends java.lang.Object

Author:
horn All Kilim components and slots have a state which is either UNINITIALIZED or INITIALIZED. A component and its slots are both created by the component factory in the UNINITIALIZED state. A component interface value can only be accessed and used when the component and slot the interface belongs to are in the INITIALIZED state. It is the responsability of instanciation managers to "initialize" components and slots. The Kilim model therefore uses pre and post methods : the underlying logics for interfaces is roughly the following : if (containing component or slot in UNITIALIZED state) { initializeInstanciation(component, interface); access to the interface (i.e. invoke getValue() on the interface). finalizeInstanciation(component, interface); } ///////////////////////////////////////////////////////////////////////////////// The same constraints apply to the plug operation. The underlying logics for interfaces is roughly the following : if (component to be plugged or slot in UNITIALIZED state) { initializePlug(component, slot); plug the component finalizePlugcomponent, slot); }

Constructor Summary
InstanciationMger()
           
 
Method Summary
 void finalizeInstanciation(Component aComponent, ComponentInterface aInterface)
          This is the "post" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.
abstract  void finalizeInstanciation(Component aComponent, ComponentInterface aInterface, MappingContext aContext)
          This is the "post" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.
 void finalizePlug(Component aComponent, ComponentSlot aSlot)
          This is the "post" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.
abstract  void finalizePlug(Component aComponent, ComponentSlot aSlot, MappingContext aContext)
          This is the "post" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.
 void initializeInstanciation(Component aComponent, ComponentInterface aInterface)
          This is the "pre" method called by the Kilim runtime when it has to access the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.
abstract  void initializeInstanciation(Component aComponent, ComponentInterface aInterface, MappingContext aContext)
          This is the "pre" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.
 void initializePlug(Component aComponent, ComponentSlot aSlot)
          This is the "pre" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.
abstract  void initializePlug(Component aComponent, ComponentSlot aSlot, MappingContext aContext)
          This is the "pre" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanciationMger

public InstanciationMger()
Method Detail

initializeInstanciation

public void initializeInstanciation(Component aComponent,
                                    ComponentInterface aInterface)
                             throws KilimException
This is the "pre" method called by the Kilim runtime when it has to access the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot. This method is strictly equivalent to initializeInstanciation(aComponent, aInterface, null);

Parameters:
aComponent - : the component containing the interface
aInterface - : the accessed interface
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

initializeInstanciation

public abstract void initializeInstanciation(Component aComponent,
                                             ComponentInterface aInterface,
                                             MappingContext aContext)
                                      throws KilimException
This is the "pre" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.

Parameters:
aComponent - : the component containing the interface
aInterface - : the accessed interface
aContext - : the mapping context
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

finalizeInstanciation

public void finalizeInstanciation(Component aComponent,
                                  ComponentInterface aInterface)
                           throws KilimException
This is the "post" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot. This method is strictly equivalent to finalizeInstanciation(aComponent, aInterface, null);

Parameters:
aComponent - : the component containing the interface
aInterface - : the accessed interface
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

finalizeInstanciation

public abstract void finalizeInstanciation(Component aComponent,
                                           ComponentInterface aInterface,
                                           MappingContext aContext)
                                    throws KilimException
This is the "post" method called by the Kilim runtime when it has to get the value of an interface (port, provider, property) belonging to a UNITIALIZED component or slot.

Parameters:
aComponent - : the component containing the interface
aInterface - : the accessed interface
aContext - : the mapping context
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

initializePlug

public void initializePlug(Component aComponent,
                           ComponentSlot aSlot)
                    throws KilimException
This is the "pre" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.

Parameters:
aComponent - : the component to be plugged
aSlot - : the slot
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

initializePlug

public abstract void initializePlug(Component aComponent,
                                    ComponentSlot aSlot,
                                    MappingContext aContext)
                             throws KilimException
This is the "pre" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.

Parameters:
aComponent - : the component to be plugged
aSlot - : the slot
aContext - : the maping context
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

finalizePlug

public void finalizePlug(Component aComponent,
                         ComponentSlot aSlot)
                  throws KilimException
This is the "post" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.

Parameters:
aComponent - : the component to be plugged
aSlot - : the slot
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.

finalizePlug

public abstract void finalizePlug(Component aComponent,
                                  ComponentSlot aSlot,
                                  MappingContext aContext)
                           throws KilimException
This is the "post" method called by the Kilim runtime when it has to plug either an UNINITIALIZED component or an INITIALIZED component into an UNITIALIZED slot.

Parameters:
aComponent - : the component to be plugged
aSlot - : the slot
aContext - : the maping context
Throws:
KilimException - : generated by the instantiation manager in case of problems. These are specific to each manager.