Method from java.beans.beancontext.BeanContextChildSupport Detail: |
public void addPropertyChangeListener(String name,
PropertyChangeListener pcl) {
pcSupport.addPropertyChangeListener(name, pcl);
}
Add a PropertyChangeListener for a specific property.
The same listener object may be added more than once. For each
property, the listener will be invoked the number of times it was added
for that property.
If name or pcl is null, no exception is thrown
and no action is taken. |
public void addVetoableChangeListener(String name,
VetoableChangeListener vcl) {
vcSupport.addVetoableChangeListener(name, vcl);
}
Add a VetoableChangeListener for a specific property.
The same listener object may be added more than once. For each
property, the listener will be invoked the number of times it was added
for that property.
If name or vcl is null, no exception is thrown
and no action is taken. |
public void firePropertyChange(String name,
Object oldValue,
Object newValue) {
pcSupport.firePropertyChange(name, oldValue, newValue);
}
Report a bound property update to any registered listeners. No event is
fired if old and new are equal and non-null. |
public void fireVetoableChange(String name,
Object oldValue,
Object newValue) throws PropertyVetoException {
vcSupport.fireVetoableChange(name, oldValue, newValue);
}
|
public synchronized BeanContext getBeanContext() {
return beanContext;
}
Gets the nesting BeanContext
for this BeanContextChildSupport . |
public BeanContextChild getBeanContextChildPeer() {
return beanContextChildPeer;
}
Gets the BeanContextChild associated with this
BeanContextChildSupport. |
protected void initializeBeanContextResources() {
// do nothing
}
This method may be overridden by subclasses to provide their own
initialization behaviors. When invoked any resources requried by the
BeanContextChild should be obtained from the current BeanContext. |
public boolean isDelegated() {
return !this.equals(beanContextChildPeer);
}
Reports whether or not this class is a delegate of another. |
protected void releaseBeanContextResources() {
// do nothing
}
This method may be overridden by subclasses to provide their own
release behaviors. When invoked any resources held by this instance
obtained from its current BeanContext property should be released
since the object is no longer nested within that BeanContext. |
public void removePropertyChangeListener(String name,
PropertyChangeListener pcl) {
pcSupport.removePropertyChangeListener(name, pcl);
}
Remove a PropertyChangeListener for a specific property.
If pcl was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If name is null, no exception is thrown
and no action is taken.
If pcl is null, or was never added for the specified
property, no exception is thrown and no action is taken. |
public void removeVetoableChangeListener(String name,
VetoableChangeListener vcl) {
vcSupport.removeVetoableChangeListener(name, vcl);
}
Removes a VetoableChangeListener .
If pcl was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If name is null, no exception is thrown
and no action is taken.
If vcl is null, or was never added for the specified
property, no exception is thrown and no action is taken. |
public void serviceAvailable(BeanContextServiceAvailableEvent bcsae) {
}
A new service is available from the nesting BeanContext.
Subclasses may override this method in order to implement their own
behaviors |
public void serviceRevoked(BeanContextServiceRevokedEvent bcsre) {
}
A service provided by the nesting BeanContext has been revoked.
Subclasses may override this method in order to implement their own
behaviors. |
public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException {
if (bc == beanContext) return;
BeanContext oldValue = beanContext;
BeanContext newValue = bc;
if (!rejectedSetBCOnce) {
if (rejectedSetBCOnce = !validatePendingSetBeanContext(bc)) {
throw new PropertyVetoException(
"setBeanContext() change rejected:",
new PropertyChangeEvent(beanContextChildPeer, "beanContext", oldValue, newValue)
);
}
try {
fireVetoableChange("beanContext",
oldValue,
newValue
);
} catch (PropertyVetoException pve) {
rejectedSetBCOnce = true;
throw pve; // re-throw
}
}
if (beanContext != null) releaseBeanContextResources();
beanContext = newValue;
rejectedSetBCOnce = false;
firePropertyChange("beanContext",
oldValue,
newValue
);
if (beanContext != null) initializeBeanContextResources();
}
Sets the BeanContext for
this BeanContextChildSupport . |
public boolean validatePendingSetBeanContext(BeanContext newValue) {
return true;
}
Called from setBeanContext to validate (or otherwise) the
pending change in the nesting BeanContext property value.
Returning false will cause setBeanContext to throw
PropertyVetoException. |