Expresso 5-6

com.jcorporate.expresso.kernel
Interface ContainerListener

All Superinterfaces:
EventListener

public interface ContainerListener
extends EventListener

This class is to provide for event notifications whenever a parent container changes. Event Handers should work hard to be 'quick' about their processing so that they don't hold up the hold system while events are getting handled

Also Please Note: Implementers of the Container Listener should ideally have their event handlers marked synchronized.

Author:
Michael Rimov

Method Summary
 void onAdd(ExpressoComponent newComponent)
          Called whenever a new component is added to the container.
 void onInstall(ExpressoComponent installingComponent, InstallLog log)
          Called whenever a component is installed into a component container.
 void onRemove(ExpressoComponent removingComponent)
          Called whenever a component is removed from the container.
 void onUninstall(ExpressoComponent uninstallComponent, InstallLog log)
          Called whenever a component is uninstalled from the ComponentContainer
 

Method Detail

onAdd

public void onAdd(ExpressoComponent newComponent)
           throws ContainerVetoException
Called whenever a new component is added to the container. The listener has the opportunity to strenusously object to the component being added by throwing a ContainerVetoException. This should only occur whenever installing the new component would seriously harm the operation of the current controller... ie extreme cases only.

Parameters:
newComponent - the new component instance getting installed.
Throws:
ContainerVetoException - if the component should NOT be installed for some reason or another.

onRemove

public void onRemove(ExpressoComponent removingComponent)
              throws ContainerVetoException
Called whenever a component is removed from the container. If the removal if the specified component causes SERIOUS problem with the operation of the current component, the component can throw a ContainerVetoException, however this should only occur in very rare cases.

Parameters:
removingComponent - The component being removed
Throws:
ContainerVetoException

onInstall

public void onInstall(ExpressoComponent installingComponent,
                      InstallLog log)
Called whenever a component is installed into a component container. Since add() is called first, we don't have the option to throw ContainerVetoException since in onAdd is the chance to do so

Parameters:
installingComponent - the component that is getting installed
log - The InstallLog that allows us to do any final 'output notes'

onUninstall

public void onUninstall(ExpressoComponent uninstallComponent,
                        InstallLog log)
Called whenever a component is uninstalled from the ComponentContainer

Parameters:
uninstallComponent - the component that is getting uninstalled
log - The InstallLog that allows us to do any final 'output notes'

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.