edu.internet2.middleware.shibboleth.common.config.service
Class ServletContextAttributeExporter

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.config.service.ServletContextAttributeExporter
All Implemented Interfaces:
Service, BeanNameAware, ApplicationContextAware

public class ServletContextAttributeExporter
extends Object
implements Service, ApplicationContextAware, BeanNameAware

A simple service that exports Spring beans into the Servlet context as an attribute.


Constructor Summary
ServletContextAttributeExporter(Collection<String> beans)
          Constructor.
 
Method Summary
 void destroy()
          Destroys a service, freeing any resources it may currently be using.
 String getId()
          Gets the ID of this service.
 void initialize()
          Initializes this service.
 boolean isDestroyed()
          Gets whether the service has been destroyed.
 boolean isInitialized()
          Gets whether the service is initialized and ready for use.
 void setApplicationContext(ApplicationContext context)
          
 void setBeanName(String name)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextAttributeExporter

public ServletContextAttributeExporter(Collection<String> beans)
Constructor.

Parameters:
beans - ID of beans exported into the servlet context
Method Detail

destroy

public void destroy()
             throws ServiceException
Destroys a service, freeing any resources it may currently be using. Whether a service can be re-initialized after being destroyed is implementation dependent.

Specified by:
destroy in interface Service
Throws:
ServiceException - thrown if there is a problem destroying the service

getId

public String getId()
Gets the ID of this service.

Specified by:
getId in interface Service
Returns:
ID of this service

initialize

public void initialize()
                throws ServiceException
Initializes this service. Calling this on an initialized service should return immediately without affecting any service state.

Specified by:
initialize in interface Service
Throws:
ServiceException - thrown if there is a problem initializing the service

isInitialized

public boolean isInitialized()
Gets whether the service is initialized and ready for use.

Specified by:
isInitialized in interface Service
Returns:
true if the service is ready for use, false it not

setApplicationContext

public void setApplicationContext(ApplicationContext context)

Specified by:
setApplicationContext in interface ApplicationContextAware

setBeanName

public void setBeanName(String name)

Specified by:
setBeanName in interface BeanNameAware

isDestroyed

public boolean isDestroyed()
Gets whether the service has been destroyed.

Specified by:
isDestroyed in interface Service
Returns:
true if the service has been destroyed


Copyright © 2006-2010 Internet2. All Rights Reserved.