|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.workflow.util.ScopeSupport
public class ScopeSupport
ScopeSupport is a convenience class for managing the
firing of ScopeEvents
to registered
ScopeListeners
.
Field Summary | |
---|---|
protected ScopeListener[] |
listeners
The set of registered ScopeListener event listeners. |
protected Scope |
scope
The Scope for whom we will fire events. |
Constructor Summary | |
---|---|
ScopeSupport(Scope scope)
Construct a new ScopeSupport object associated with the specified Scope. |
Method Summary | |
---|---|
void |
addScopeListener(ScopeListener listener)
Add a listener that is notified each time beans are added, replaced, or removed in this scope. |
void |
fireBeanAdded(String key,
Object value)
Fire a beanAdded() event to all registered listeners. |
void |
fireBeanRemoved(String key,
Object value)
Fire a beanRemoved() event to all registered listeners. |
void |
fireBeanReplaced(String key,
Object value)
Fire a beanReplaced() event to all registered listeners. |
void |
fireScopeCleared()
Fire a scopeCleared() event to all registered listeners. |
void |
removeScopeListener(ScopeListener listener)
Remove a listener that is notified each time beans are added, replaced, or removed in this scope. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ScopeListener[] listeners
ScopeListener
event listeners.
protected Scope scope
Scope
for whom we will fire events.
Constructor Detail |
---|
public ScopeSupport(Scope scope)
scope
- Scope for whom we will fire eventsMethod Detail |
---|
public void addScopeListener(ScopeListener listener)
listener
- The ScopeListener to be addedpublic void removeScopeListener(ScopeListener listener)
listener
- The ScopeListener to be removedpublic void fireBeanAdded(String key, Object value)
beanAdded()
event to all registered listeners.
key
- Key of the bean that was addedvalue
- Value of the bean that was addedpublic void fireBeanRemoved(String key, Object value)
beanRemoved()
event to all registered listeners.
key
- Key of the bean that was removedvalue
- Value of the bean that was removedpublic void fireBeanReplaced(String key, Object value)
beanReplaced()
event to all registered listeners.
key
- Key of the bean that was replacedvalue
- Old value of the bean that was replacedpublic void fireScopeCleared()
scopeCleared()
event to all registered listeners.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |