org.apache.xbean.server.spring.configuration
Class SpringConfigurationServiceFactory

java.lang.Object
  extended by org.apache.xbean.kernel.AbstractServiceFactory
      extended by org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory
All Implemented Interfaces:
org.apache.xbean.kernel.ServiceFactory

public class SpringConfigurationServiceFactory
extends org.apache.xbean.kernel.AbstractServiceFactory

SpringConfigurationServiceFactory is manages the creation and destruction of a SpringConfiguration.

Since:
2.0
Author:
Dain Sundstrom

Constructor Summary
SpringConfigurationServiceFactory(org.springframework.context.support.AbstractXmlApplicationContext applicationContext)
          Creates a SpringConfigurationServiceFactory that wraps the specified application context.
 
Method Summary
 Object createService(org.apache.xbean.kernel.ServiceContext serviceContext)
          
 void destroyService(org.apache.xbean.kernel.ServiceContext serviceContext)
          
 org.springframework.context.support.AbstractXmlApplicationContext getApplicationContext()
          Gets the application context wrapped by this configuration.
 ClassLoader getClassLoader()
          
 String getId()
          Gets the unique id if this configuration.
 Set getOwnedServices()
          Gets the ServiceNames of the services defined in the application context if the configuration has been started, otherwise this method returns an empty set.
 Class[] getTypes()
          
 boolean isRestartable()
          SpringConfigurationServiceFactory is restartable so this method always returns true.
 
Methods inherited from class org.apache.xbean.kernel.AbstractServiceFactory
addStartCondition, addStopCondition, getStartConditions, getStopConditions, isEnabled, removeStartCondition, removeStopCondition, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringConfigurationServiceFactory

public SpringConfigurationServiceFactory(org.springframework.context.support.AbstractXmlApplicationContext applicationContext)
Creates a SpringConfigurationServiceFactory that wraps the specified application context.

Parameters:
applicationContext - the application context for this configuration
Method Detail

getId

public String getId()
Gets the unique id if this configuration.

Returns:
the unique id if this configuration

getApplicationContext

public org.springframework.context.support.AbstractXmlApplicationContext getApplicationContext()
Gets the application context wrapped by this configuration. Use caution when modifiying this context as it can effect the running state of services.

Returns:
the application context wrapped by this configuration

getTypes

public Class[] getTypes()


isRestartable

public boolean isRestartable()
SpringConfigurationServiceFactory is restartable so this method always returns true.

Returns:
true

getOwnedServices

public Set getOwnedServices()
Gets the ServiceNames of the services defined in the application context if the configuration has been started, otherwise this method returns an empty set.

Returns:
the ServiceNames of the services defined in the application context if the configuration has been started

createService

public Object createService(org.apache.xbean.kernel.ServiceContext serviceContext)
                     throws Exception

Throws:
Exception

destroyService

public void destroyService(org.apache.xbean.kernel.ServiceContext serviceContext)


getClassLoader

public ClassLoader getClassLoader()



Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.