eXo Kernel :: MC Kernel Integration :: Demo 2.4.12-GA

org.exoplatform.kernel.demos.mc
Class ExternallyControlledInjectingBean

java.lang.Object
  extended by org.exoplatform.kernel.demos.mc.ExternallyControlledInjectingBean
All Implemented Interfaces:
org.picocontainer.Startable

public class ExternallyControlledInjectingBean
extends Object
implements org.picocontainer.Startable

This POJO demonstrates how to use external configuration (mc-int-config.xml) to perform injections of JBoss Microcontainer components into a service object configured and managed through exo-kernel.

Author:
Marko Strukelj

Nested Class Summary
static class ExternallyControlledInjectingBean.ConfigurationHolder
          Inner data structure for testing nested property injection
 
Constructor Summary
ExternallyControlledInjectingBean()
          In this demo this bean is to be instantiated by exo-kernel.
 
Method Summary
 InjectedBean getBean()
          Getter method.
 Map getBindingsMap()
          Getter method.
 ExternallyControlledInjectingBean.ConfigurationHolder getConfig()
          Getter method.
 int getStartCount()
          Getter method.
 String getStringValue()
          Getter method.
 TransactionManager getTransactionManager()
          Getter method.
 void initialize(String param1, String param2, org.jboss.dependency.spi.Controller param3)
          Non-setter method externally configured as injection method called with injected parameters
 boolean isInstallOk()
          Getter method.
 void setBean(InjectedBean bean)
          Setter method, externally configured as injection point for type matching injection.
 void setBindingsMap(Map bindingsMap)
          Setter method, externally configured as injection point.
 void setStringValue(String stringValue)
          Setter method externally configured as injection point for property getter injection.
 void setTransactionManager(TransactionManager tm)
          Setter method, externally configured as injection point for type matching injection
 void start()
          org.picocontainer.Startable lifecycle method.
 void stop()
          org.picocontainer.Startable lifecycle method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternallyControlledInjectingBean

public ExternallyControlledInjectingBean()
In this demo this bean is to be instantiated by exo-kernel. We can not use constructor based injection that mc kernel supports, since it's not mc kernel that does the instantiation.

Method Detail

getTransactionManager

public TransactionManager getTransactionManager()
Getter method.

Returns:

setTransactionManager

public void setTransactionManager(TransactionManager tm)
Setter method, externally configured as injection point for type matching injection

Parameters:
tm -

getBean

public InjectedBean getBean()
Getter method.

Returns:
injected bean

setBean

public void setBean(InjectedBean bean)
Setter method, externally configured as injection point for type matching injection.

Parameters:
bean -

getBindingsMap

public Map getBindingsMap()
Getter method.

Returns:

setBindingsMap

public void setBindingsMap(Map bindingsMap)
Setter method, externally configured as injection point.

Parameters:
bindingsMap -

getStringValue

public String getStringValue()
Getter method.

Returns:

setStringValue

public void setStringValue(String stringValue)
Setter method externally configured as injection point for property getter injection.

Parameters:
stringValue -

getStartCount

public int getStartCount()
Getter method.

Returns:
start count

start

public void start()
org.picocontainer.Startable lifecycle method. Supposed to be called exactly once.

Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
org.picocontainer.Startable lifecycle method.

Specified by:
stop in interface org.picocontainer.Startable

getConfig

public ExternallyControlledInjectingBean.ConfigurationHolder getConfig()
Getter method.

Returns:

initialize

public void initialize(String param1,
                       String param2,
                       org.jboss.dependency.spi.Controller param3)
Non-setter method externally configured as injection method called with injected parameters

Parameters:
param1 -
param2 -
param3 -

isInstallOk

public boolean isInstallOk()
Getter method.

Returns:
true if install method was called successfully

eXo Kernel :: MC Kernel Integration :: Demo 2.4.12-GA

Copyright © 2015 eXo Platform SAS. All Rights Reserved.