org.springframework.extensions.surf.util
Class AbstractLifecycleBean
java.lang.Object
org.springframework.extensions.surf.util.AbstractLifecycleBean
- All Implemented Interfaces:
- EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
- Direct Known Subclasses:
- BaseConfigService
public abstract class AbstractLifecycleBean
- extends Object
- implements org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware
Abstract helper for assisting the bootstrap and termination of Surf Spring Components
- Author:
- davidc
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Method Summary |
protected org.springframework.context.ApplicationContext |
getApplicationContext()
Gets the Application Context |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
|
protected abstract void |
onBootstrap(org.springframework.context.ApplicationEvent event)
Callback for initialising Component on first startup of application context |
protected abstract void |
onShutdown(org.springframework.context.ApplicationEvent event)
Callback for terminating Component on shutdown of application context |
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 |
log
protected static final org.apache.commons.logging.Log log
AbstractLifecycleBean
public AbstractLifecycleBean()
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEvent
in interface org.springframework.context.ApplicationListener
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
getApplicationContext
protected org.springframework.context.ApplicationContext getApplicationContext()
- Gets the Application Context
- Returns:
- application context
onBootstrap
protected abstract void onBootstrap(org.springframework.context.ApplicationEvent event)
- Callback for initialising Component on first startup of application context
- Parameters:
event
-
onShutdown
protected abstract void onShutdown(org.springframework.context.ApplicationEvent event)
- Callback for terminating Component on shutdown of application context
- Parameters:
event
-
Copyright © 2009 SpringSource, Inc. All Rights Reserved.