org.apache.felix.servicebinder
Class InstanceManager.StateChangeMulticaster
java.lang.Object
org.apache.felix.servicebinder.InstanceManager.StateChangeMulticaster
- All Implemented Interfaces:
- EventListener, InstanceReferenceListener
- Enclosing class:
- InstanceManager
public static class InstanceManager.StateChangeMulticaster
- extends Object
- implements InstanceReferenceListener
- Version:
- X.XX Feb 3, 2004 * @author Humberto Cervantes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
a
protected InstanceReferenceListener a
b
protected InstanceReferenceListener b
InstanceManager.StateChangeMulticaster
protected InstanceManager.StateChangeMulticaster(InstanceReferenceListener a,
InstanceReferenceListener b)
validated
public void validated(InstanceReferenceEvent e)
- Description copied from interface:
InstanceReferenceListener
- This method is called when an InstanceReference's
underlying object becomes valid, i.e., the instance is
available for use. This event is fired during the following
sequence of steps:
- Instance created.
- Dependencies bound, if any.
- Services registered, if any.
- Lifecycle.activate() is called, if the instance
implements the Lifecycle interface.
- Fire InstanceReferenceListener.validated().
- Specified by:
validated
in interface InstanceReferenceListener
- Parameters:
e
- the associated instance reference event.
invalidating
public void invalidating(InstanceReferenceEvent e)
- Description copied from interface:
InstanceReferenceListener
- This method is called when an InstanceReference's
underlying object is going to be invalidated. This event
is fired during the following sequence of steps:
- Fire InstanceReferenceListener.invalidating().
- Call Lifecycle.deactivate(), if the instance
implements the Lifecycle interface.
- Unregister services, if any.
- Unbind dependencies, if any.
- Dispose instance.
Note: Care must be taken during this callback, because the
underlying object associated with the instance reference may
not be fully functioning. For example, this event might be
fired in direct response to a dependent service shutting down,
which then instigates the invalidation of the underlying object
instance.
- Specified by:
invalidating
in interface InstanceReferenceListener
- Parameters:
e
- the associated instance reference event.
add
public static InstanceReferenceListener add(InstanceReferenceListener a,
InstanceReferenceListener b)
remove
public static InstanceReferenceListener remove(InstanceReferenceListener a,
InstanceReferenceListener b)
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.