All Packages Class Hierarchy This Package Previous Next Index
Interface com.ibm.beans.dip.DippableSupport
- public interface interface DippableSupport
- extends Serializable, Dippable
This interface is implemented by classes that handle dips for a
dippable bean. Dippable beans use a DippableSupport implementation to manage
dips and their listeners.
The DippableSupport interface is an implementation of the strategy pattern
described in
'Design Patterns' by Gamma, Helm, Johnson, and Vlissides. Here the
dippable bean is the Composition Class, the DippableSupport interface is
the Compositor interface, and the DippableSupportImp class is one of the
concrete Compositor classes.
-
EVENT_METHOD
- Constant to indicate an event method.
-
GENERAL_METHOD
- Constant to indicate a general method.
-
PROPERTY_METHOD
- Constant to indicate a property method.
-
correctForAggregateReturningThis(Object, Class, Object)
- Corrects for the case when the aggregate returns
this
.
-
correctForAggregateReturningThis(Object[], Class, Object)
- Corrects for the case when the aggregate returns
this
.
-
fireEventFire(int, String)
- Reports a bound event firing to the registered listeners.
-
fireMethodCall(int, String, Object[])
- Reports a bound method call to the registered listeners.
-
firePropertyChange(int, String, Object, Object)
- Reports a bound property change to the registered listeners.
-
fireVetoableChange(int, String, Object, Object)
- Reports a vetoable property change to the registered listeners.
-
fireVetoableEvent(int, String)
- Reports a vetoable event firing to the registered listeners.
-
fireVetoableMethod(int, String, Object[])
- Reports a vetoable method call to the registered listeners.
-
hasBoundEventListeners(int)
- Determines whether there are any bound listeners for
this event-related method.
-
hasBoundMethodListeners(int)
- Determines whether there are any bound listeners for
this general method.
-
hasBoundPropertyListeners(int)
- Determines whether there are any bound listeners for
this property-related method.
-
hasConstrainedEventListeners(int)
- Determines whether there are any constrained listeners for
this event-related method.
-
hasConstrainedMethodListeners(int)
- Determines whether there are any constrained listeners for
this general method.
-
hasConstrainedPropertyListeners(int)
- Determines whether there are any constrained listeners for
this property-related method.
-
needsMethodArguments(int)
- Determines whether any bound or constrained listener needs
a copy of the input arguments to this general method.
PROPERTY_METHOD
public static final int PROPERTY_METHOD
- Constant to indicate a property method.
EVENT_METHOD
public static final int EVENT_METHOD
- Constant to indicate an event method.
GENERAL_METHOD
public static final int GENERAL_METHOD
- Constant to indicate a general method.
hasConstrainedPropertyListeners
public abstract boolean hasConstrainedPropertyListeners(int methodIndex)
- Determines whether there are any constrained listeners for
this property-related method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any constrained property change
listeners; false
otherwise.
hasBoundPropertyListeners
public abstract boolean hasBoundPropertyListeners(int methodIndex)
- Determines whether there are any bound listeners for
this property-related method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any bound property change
listeners; false
otherwise.
firePropertyChange
public abstract void firePropertyChange(int methodIndex,
String propertyName,
Object oldValue,
Object newValue)
- Reports a bound property change to the registered listeners.
- Parameters:
- methodIndex
-
-
An index indicating which property method in the
dippable bean is reporting a bound property change.
- propertyName - The programmatic name of the property
that was changed.
- oldValue - The old value of the property.
- newValue - The new value of the property.
fireVetoableChange
public abstract void fireVetoableChange(int methodIndex,
String propertyName,
Object oldValue,
Object newValue) throws PropertyVetoException
- Reports a vetoable property change to the registered listeners.
If anyone vetos the property change, then the property change
does not happen.
- Parameters:
- methodIndex
-
-
An index indicating which property method in the
dippable bean is reporting a vetoable property change.
- propertyName - The programmatic name of the property
that was changed.
- oldValue - The old value of the property.
- newValue - The new value of the property.
- Throws: PropertyVetoException
- Thrown
if the VetoableChangeListener implementation wants the
property change to be canceled.
hasConstrainedMethodListeners
public abstract boolean hasConstrainedMethodListeners(int methodIndex)
- Determines whether there are any constrained listeners for
this general method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any constrained method call
listeners; false
otherwise.
hasBoundMethodListeners
public abstract boolean hasBoundMethodListeners(int methodIndex)
- Determines whether there are any bound listeners for
this general method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any bound method call
listeners; false
otherwise.
needsMethodArguments
public abstract boolean needsMethodArguments(int methodIndex)
- Determines whether any bound or constrained listener needs
a copy of the input arguments to this general method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if any bound or constrained method call
needs the method arguments; false
otherwise.
fireMethodCall
public abstract void fireMethodCall(int methodIndex,
String methodID,
Object args[])
- Reports a bound method call to the registered listeners.
- Parameters:
- methodIndex
-
-
An index indicating which general method in the
dippable bean is reporting a bound method call.
- methodId - A string uniquely identifying the method called.
- args - The array of arguments for the method.
fireVetoableMethod
public abstract void fireVetoableMethod(int methodIndex,
String methodID,
Object args[]) throws MethodVetoException
- Reports a vetoable method call to the registered listeners.
If anyone vetos the method call, then the method call
does not happen.
- Parameters:
- methodIndex
-
-
An index indicating which general method in the
dippable bean is reporting a vetoable method call.
- methodId - A string uniquely identifying the method called.
- args - The array of arguments passed to the method that was called.
- Throws: MethodVetoException
- Thrown
if the VetoableMethodListener implementation wants the
method call to be canceled.
correctForAggregateReturningThis
public abstract void correctForAggregateReturningThis(Object returnArray[],
Class returnClass,
Object aggregate)
- Corrects for the case when the aggregate returns
this
.
When a delegator object delegates the method call to an aggregate object,
and the aggregate object returns a reference to itself in the
return value, then the delegator object must correct the reference
so that the return value from the delegator object returns a reference
to the delegator object instead of a
reference to the aggregate object. This method checks the proposed
return value and changes any inappropriate references from the
aggregate object to the delegate object.
- Parameters:
- returnArray - The array to be returned from the delegate object.
- returnClass - The Class type of each element in
returnArray
.
- aggregate - The aggregate object.
correctForAggregateReturningThis
public abstract Object correctForAggregateReturningThis(Object returnValue,
Class returnClass,
Object aggregate)
- Corrects for the case when the aggregate returns
this
.
When a delegator object delegates the method call to an aggregate object,
and the aggregate object returns a reference to itself in the
return value, then the delegator object must correct the reference
so that the return value from the delegator object returns a reference
to the delegator object instead of a
reference to the aggregate object. This method checks the proposed
return value and changes any inappropriate references from the
aggregate object to the delegate object.
- Parameters:
- returnValue - The proposed return value from the delegate object.
- returnClass - The Class type of the
returnValue
.
- aggregate - The aggregate object.
- Returns:
- The return value.
hasConstrainedEventListeners
public abstract boolean hasConstrainedEventListeners(int methodIndex)
- Determines whether there are any constrained listeners for
this event-related method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any constrained event fire
listeners; false
otherwise.
hasBoundEventListeners
public abstract boolean hasBoundEventListeners(int methodIndex)
- Determines whether there are any bound listeners for
this event-related method.
- Parameters:
- methodIndex - Index indicating the calling method.
- Returns:
-
true
if there are any bound event fire
listeners; false
otherwise.
fireEventFire
public abstract void fireEventFire(int methodIndex,
String eventSetName)
- Reports a bound event firing to the registered listeners.
- Parameters:
- methodIndex
-
-
An index indicating which event method in the
dippable bean is reporting a bound event firing.
- eventSetName - The event set name for the event that was fired.
fireVetoableEvent
public abstract void fireVetoableEvent(int methodIndex,
String eventSetName) throws EventVetoException
- Reports a vetoable event firing to the registered listeners.
If anyone vetos the event firing, then the event firing
does not happen.
- Parameters:
- methodIndex
-
-
An index indicating which event method in the
dippable bean is reporting a vetoable event firing.
- eventSetName - The event set name of the event
whose notification method was called.
- Throws: EventVetoException
- Thrown
if the VetoableEventListener implementation wants the
event firing to be canceled.
All Packages Class Hierarchy This Package Previous Next Index