eXo Kernel :: MC Kernel Integration :: Implementation 2.4.1-GA

org.exoplatform.container.mc.impl
Class MCComponentAdapter

java.lang.Object
  extended by org.exoplatform.container.mc.impl.MCComponentAdapter
All Implemented Interfaces:
org.picocontainer.ComponentAdapter

public class MCComponentAdapter
extends Object
implements org.picocontainer.ComponentAdapter

A wrapping adapter, that takes care of mc integration at component instantiation time.

Author:
Ales Justin, Marko Strukelj

Constructor Summary
MCComponentAdapter(org.jboss.kernel.spi.dependency.KernelController controller, org.picocontainer.ComponentAdapter delegate, InterceptMC interceptMC, org.jboss.beans.metadata.plugins.AbstractBeanMetaData data)
          The only constructor.
 
Method Summary
 void accept(org.picocontainer.PicoVisitor visitor)
          Delegation-only method.
 Class getComponentImplementation()
          Getter for component implementation class.
 Object getComponentInstance(org.picocontainer.PicoContainer container)
          This is where mc integration happens.
 Object getComponentKey()
          Getter method for component key.
 void verify(org.picocontainer.PicoContainer container)
          Delegation-only method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCComponentAdapter

public MCComponentAdapter(org.jboss.kernel.spi.dependency.KernelController controller,
                          org.picocontainer.ComponentAdapter delegate,
                          InterceptMC interceptMC,
                          org.jboss.beans.metadata.plugins.AbstractBeanMetaData data)
The only constructor.

Parameters:
controller - Kernel controller to use
delegate - original component adapter
interceptMC - mc-integration configuration in the form of annotation
Method Detail

getComponentKey

public Object getComponentKey()
Getter method for component key.

Specified by:
getComponentKey in interface org.picocontainer.ComponentAdapter
Returns:
String or Class representing a key

getComponentImplementation

public Class getComponentImplementation()
Getter for component implementation class.

Specified by:
getComponentImplementation in interface org.picocontainer.ComponentAdapter
Returns:
component implementation class

getComponentInstance

public Object getComponentInstance(org.picocontainer.PicoContainer container)
                            throws org.picocontainer.PicoInitializationException,
                                   org.picocontainer.PicoIntrospectionException
This is where mc integration happens. Instantiation is first delegated to original component adapter, the resulting instance is then sent through kernel controller to be injected by mc kernel.

Specified by:
getComponentInstance in interface org.picocontainer.ComponentAdapter
Parameters:
container - pico container that holds this component adapter
Returns:
object with injections already performed on it
Throws:
org.picocontainer.PicoInitializationException
org.picocontainer.PicoIntrospectionException

verify

public void verify(org.picocontainer.PicoContainer container)
            throws org.picocontainer.PicoIntrospectionException
Delegation-only method.

Specified by:
verify in interface org.picocontainer.ComponentAdapter
Parameters:
container -
Throws:
org.picocontainer.PicoIntrospectionException

accept

public void accept(org.picocontainer.PicoVisitor visitor)
Delegation-only method.

Specified by:
accept in interface org.picocontainer.ComponentAdapter
Parameters:
visitor -

eXo Kernel :: MC Kernel Integration :: Implementation 2.4.1-GA

Copyright © 2012 eXo Platform SAS. All Rights Reserved.