org.objectweb.dsrg.sofa.bootstrap
Class MIInComponentBase

java.lang.Object
  extended by org.objectweb.dsrg.sofa.bootstrap.MIInComponentBase
All Implemented Interfaces:
MIInterceptor, MIInComponent, SOFAMicroComponent

public class MIInComponentBase
extends java.lang.Object
implements SOFAMicroComponent, MIInComponent, MIInterceptor

Implements logic of the InComponent aspect.


Constructor Summary
MIInComponentBase()
           
 
Method Summary
 MIComponent getComponent()
          Returns control interface of the component.
 java.lang.Object getProvided(java.lang.String name)
          Takes reference to implementation of provided interface with given name.
 void init(ComponentDescription component, java.util.Map<java.lang.String,java.lang.String> parameters)
          Initialises microcomponent.
 void notifyCall(java.lang.String method)
          Invoked when intercepted method is called.
 void notifyReturn(java.lang.String method)
          Invoked when interpected method returns.
 void setRequired(java.lang.String name, java.lang.Object ref)
          Gives the microcomponent reference to destination of its required interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIInComponentBase

public MIInComponentBase()
Method Detail

getComponent

public MIComponent getComponent()
Description copied from interface: MIInComponent
Returns control interface of the component.

Specified by:
getComponent in interface MIInComponent
Returns:
Reference to component control interface of the component which incomponent control interface was called.

notifyCall

public void notifyCall(java.lang.String method)
Description copied from interface: MIInterceptor
Invoked when intercepted method is called.

Specified by:
notifyCall in interface MIInterceptor
Parameters:
method - Name of the method that has been called.

notifyReturn

public void notifyReturn(java.lang.String method)
Description copied from interface: MIInterceptor
Invoked when interpected method returns.

Specified by:
notifyReturn in interface MIInterceptor
Parameters:
method - Name of the method that returns.

init

public void init(ComponentDescription component,
                 java.util.Map<java.lang.String,java.lang.String> parameters)
          throws SOFAException
Description copied from interface: SOFAMicroComponent
Initialises microcomponent. This method is called after all microcomponents are instantiated and bound.

Specified by:
init in interface SOFAMicroComponent
Parameters:
component - Containing component description.
parameters - Parameters from the model extended by parameters from the Sofa2 runtime.
Throws:
SOFAException

getProvided

public java.lang.Object getProvided(java.lang.String name)
                             throws SOFAException
Description copied from interface: SOFAMicroComponent
Takes reference to implementation of provided interface with given name.

Specified by:
getProvided in interface SOFAMicroComponent
Parameters:
name - Name of the provided interface.
Returns:
Reference to the provided interface implementation.
Throws:
SOFAException

setRequired

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

Specified by:
setRequired in interface SOFAMicroComponent
Parameters:
name - Name of the required interface.
ref - Reference to the destination interface implementation.
Throws:
SOFAException