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

java.lang.Object
  extended byorg.apache.xbean.kernel.AbstractServiceFactory
      extended byorg.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
Version:
$Id$
Author:
Dain Sundstrom

Constructor Summary
SpringConfigurationServiceFactory(org.apache.xbean.spring.context.SpringApplicationContext applicationContext)
          Creates a SpringConfigurationServiceFactory that wraps the specified application context.
 
Method Summary
 java.lang.Object createService(org.apache.xbean.kernel.ServiceContext serviceContext)
          
 void destroyService(org.apache.xbean.kernel.ServiceContext serviceContext)
          
 org.apache.xbean.spring.context.SpringApplicationContext getApplicationContext()
          Gets the application context wrapped by this configuration.
 java.lang.String getId()
          Gets the unique id if this configuration.
 java.util.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.
 java.lang.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.apache.xbean.spring.context.SpringApplicationContext applicationContext)
Creates a SpringConfigurationServiceFactory that wraps the specified application context.

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

getId

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

Returns:
the unique id if this configuration

getApplicationContext

public org.apache.xbean.spring.context.SpringApplicationContext 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 java.lang.Class[] getTypes()


isRestartable

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

Returns:
true

getOwnedServices

public java.util.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 java.lang.Object createService(org.apache.xbean.kernel.ServiceContext serviceContext)
                               throws java.lang.Exception

Throws:
java.lang.Exception

destroyService

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



Copyright © {inceptionYear}-2006 Apache Software Foundation. All Rights Reserved.