org.objectweb.dsrg.sofa.microarchitecture
Interface SOFAMicroComponent

All Known Implementing Classes:
FactoryInterceptor, InterceptorController, MIComponentImpl, MIInComponentBase, MIInComponentImpl, MILifecycleBase, MILifecycleImpl

public interface SOFAMicroComponent

Every microcomponent have to implement this interface.


Method Summary
 java.lang.Object getDelegatedProvided()
          Takes reference to delegated provided interface implementation.
 java.lang.Object getProvided(java.lang.String name)
          Takes reference to implementation of provided interface with given name.
 void init(ComponentInstance component, java.util.Map<java.lang.String,java.lang.String> parameters)
          Initialises microcomponent.
 void setDelegatedRequired(java.lang.Object ref)
          Gives the microcomponent reference to interface where to delegate calls.
 void setRequired(java.lang.String name, java.lang.Object ref)
          Gives the microcomponent reference to destination of its required interface.
 

Method Detail

init

void init(ComponentInstance component,
          java.util.Map<java.lang.String,java.lang.String> parameters)
          throws SOFAException
Initialises microcomponent. This method is called after all microcomponents are instantiated and bound.

Parameters:
instance - Containing component instance.
parameters - Parameters from the model extended by parameters from the Sofa2 runtime.
Throws:
SOFAException

getDelegatedProvided

java.lang.Object getDelegatedProvided()
                                      throws SOFAException
Takes reference to delegated provided interface implementation.

Returns:
Reference to delegated provided interface implementation.
Throws:
SOFAException

getProvided

java.lang.Object getProvided(java.lang.String name)
                             throws SOFAException
Takes reference to implementation of provided interface with given name.

Parameters:
name - Name of the provided interface.
Returns:
Reference to the provided interface implementation.
Throws:
SOFAException

setDelegatedRequired

void setDelegatedRequired(java.lang.Object ref)
                          throws SOFAException
Gives the microcomponent reference to interface where to delegate calls.

Parameters:
ref - Interface implementation reference to delegate to.
Throws:
SOFAException

setRequired

void setRequired(java.lang.String name,
                 java.lang.Object ref)
                 throws SOFAException
Gives the microcomponent reference to destination of its required interface.

Parameters:
name - Name of the required interface.
ref - Reference to the destination interface implementation.
Throws:
SOFAException