org.alfresco.repo.management.subsystems
Class DefaultPropertyBackedBeanRegistry

java.lang.Object
  extended by org.alfresco.repo.management.subsystems.DefaultPropertyBackedBeanRegistry
All Implemented Interfaces:
java.util.EventListener, PropertyBackedBeanRegistry, org.springframework.context.ApplicationListener

public class DefaultPropertyBackedBeanRegistry
extends java.lang.Object
implements PropertyBackedBeanRegistry, org.springframework.context.ApplicationListener

A default implementation of PropertyBackedBeanRegistry. An instance of this class will defer broadcasting PropertyBackedBeanEvents until it is notified that the database schema is available via a SchemaAvailableEvent. This allows listeners to potentially reconfigure the beans using persisted database information.


Constructor Summary
DefaultPropertyBackedBeanRegistry()
           
 
Method Summary
 void addListener(org.springframework.context.ApplicationListener listener)
          Registers a listener object that will be notified of register and deregister calls via a PropertyBackedBeanEvent.
 void broadcastStart(PropertyBackedBean bean)
          Signals that a PropertyBackedBean has been started.
 void broadcastStop(PropertyBackedBean bean)
          Signals that a PropertyBackedBean has been stopped.
 void deregister(PropertyBackedBean bean, boolean isPermanent)
          Signals that PropertyBackedBean#destroy(boolean) has been called on a bean.
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void register(PropertyBackedBean bean)
          Signals that a PropertyBackedBean has been initialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPropertyBackedBeanRegistry

public DefaultPropertyBackedBeanRegistry()
Method Detail

addListener

public void addListener(org.springframework.context.ApplicationListener listener)
Description copied from interface: PropertyBackedBeanRegistry
Registers a listener object that will be notified of register and deregister calls via a PropertyBackedBeanEvent.

Specified by:
addListener in interface PropertyBackedBeanRegistry
Parameters:
listener - the listener

register

public void register(PropertyBackedBean bean)
Description copied from interface: PropertyBackedBeanRegistry
Signals that a PropertyBackedBean has been initialized.

Specified by:
register in interface PropertyBackedBeanRegistry
Parameters:
bean - the bean

deregister

public void deregister(PropertyBackedBean bean,
                       boolean isPermanent)
Description copied from interface: PropertyBackedBeanRegistry
Signals that PropertyBackedBean#destroy(boolean) has been called on a bean.

Specified by:
deregister in interface PropertyBackedBeanRegistry
Parameters:
bean - the bean
isPermanent - is the component being destroyed forever, i.e. should persisted values be removed? On server shutdown, this value would be false, whereas on the removal of a dynamically created instance, this value would be true.

broadcastStart

public void broadcastStart(PropertyBackedBean bean)
Description copied from interface: PropertyBackedBeanRegistry
Signals that a PropertyBackedBean has been started.

Specified by:
broadcastStart in interface PropertyBackedBeanRegistry
Parameters:
bean - the bean

broadcastStop

public void broadcastStop(PropertyBackedBean bean)
Description copied from interface: PropertyBackedBeanRegistry
Signals that a PropertyBackedBean has been stopped.

Specified by:
broadcastStop in interface PropertyBackedBeanRegistry
Parameters:
bean - the bean

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.