org.springframework.osgi.extender.support
Class ApplicationContextConfiguration

java.lang.Object
  extended by org.springframework.osgi.extender.support.ApplicationContextConfiguration

public class ApplicationContextConfiguration
extends Object

Configuration class for Spring-DM application contexts. Determines the configuration information available in a bundle for constructing an application context. Reads all the Spring-DM options present in the bundle header.

Author:
Adrian Colyer, Costin Leau

Constructor Summary
ApplicationContextConfiguration(Bundle bundle)
          Constructs a new ApplicationContextConfiguration instance from the given bundle.
ApplicationContextConfiguration(Bundle bundle, ConfigurationScanner configurationScanner)
           
 
Method Summary
 String[] getConfigurationLocations()
          Returns the locations of the configuration resources used to build the application context (as Spring resource paths).
 long getTimeout()
          Returns the timeout (in milliseconds) an application context needs to wait for mandatory dependent services.
 boolean isCreateAsynchronously()
          Indicates if an application context needs to be created asynchronously or not.
 boolean isPublishContextAsService()
          Indicates if the application context needs to be published as a service or not.
 boolean isSpringPoweredBundle()
          Indicates if the given bundle is "Spring-Powered" or not.
 boolean isTimeoutDeclared()
           
 boolean isWaitForDependencies()
          Indicates if the configuration must wait for dependencies.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationContextConfiguration

public ApplicationContextConfiguration(Bundle bundle)
Constructs a new ApplicationContextConfiguration instance from the given bundle. Uses the DefaultConfigurationScanner internally for discovering Spring-powered bundles.

Parameters:
bundle - bundle for which the application context configuration is created

ApplicationContextConfiguration

public ApplicationContextConfiguration(Bundle bundle,
                                       ConfigurationScanner configurationScanner)
Method Detail

isSpringPoweredBundle

public boolean isSpringPoweredBundle()
Indicates if the given bundle is "Spring-Powered" or not. True if this bundle has at least one defined application context configuration file.

A bundle is "Spring-Powered" if it has at least one configuration resource.


isTimeoutDeclared

public boolean isTimeoutDeclared()

getTimeout

public long getTimeout()
Returns the timeout (in milliseconds) an application context needs to wait for mandatory dependent services.


isCreateAsynchronously

public boolean isCreateAsynchronously()
Indicates if an application context needs to be created asynchronously or not. Should the application context wait for all non-optional service references to be satisfied before starting?


isPublishContextAsService

public boolean isPublishContextAsService()
Indicates if the application context needs to be published as a service or not.

Returns:
Returns the publishContextAsService.

isWaitForDependencies

public boolean isWaitForDependencies()
Indicates if the configuration must wait for dependencies.

Returns:
true if the configuration indicates that dependencies should be waited for.

getConfigurationLocations

public String[] getConfigurationLocations()
Returns the locations of the configuration resources used to build the application context (as Spring resource paths).

Returns:
configuration paths

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Spring Framework. All Rights Reserved.