com.atlassian.plugin.osgi.bridge.external
Class SpringHostContainer

java.lang.Object
  extended by com.atlassian.plugin.osgi.bridge.external.SpringHostContainer
All Implemented Interfaces:
HostContainer, org.springframework.context.ApplicationContextAware

public class SpringHostContainer
extends java.lang.Object
implements HostContainer, org.springframework.context.ApplicationContextAware

Host container implementation that uses the bundle's application context

Since:
2.2.0

Constructor Summary
SpringHostContainer()
           
 
Method Summary
<T> T
create(java.lang.Class<T> moduleClass)
          Constructs an instance of a class, matching the constructor with the largest number of arguments first, and autowires as appropriate.
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringHostContainer

public SpringHostContainer()
Method Detail

create

public <T> T create(java.lang.Class<T> moduleClass)
         throws java.lang.IllegalArgumentException
Description copied from interface: HostContainer
Constructs an instance of a class, matching the constructor with the largest number of arguments first, and autowires as appropriate. Actual method of autowiring may vary between implementations, though all should support constructor injection.

Specified by:
create in interface HostContainer
Parameters:
moduleClass - The class
Returns:
An instance of the passed class
Throws:
java.lang.IllegalArgumentException - If unable to instantiate the class

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                           throws org.springframework.beans.BeansException
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException


Copyright © 2013 Atlassian. All Rights Reserved.