All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.dip.DippableSupportImp

java.lang.Object
   |
   +----com.ibm.beans.dip.DippableSupportImp

public class DippableSupportImp
extends Object
implements DippableSupport
The DippableSupportImp class is the default implementation of the DippableSupport interface. Dippable classes can use this class to manage dips and their listeners.


Variable Index

 o dips
The Collection of dips applied to the dippable bean.
 o efListeners
The EventFireSupport instances for the dippable bean events.
 o eventActionDescriptor
The DippableMethodActionDescriptor instances for the dippable bean events.
 o mcListeners
The MethodCallSupport instances for the dippable bean methods.
 o methodActionDescriptor
The DippableMethodActionDescriptor instances for the dippable bean methods.
 o outputStream
The OutputStream property
 o outputWriter
The writer used to write to the outputStream property.
 o pcListeners
The PropertyChangeSupport instances for the dippable bean properties.
 o propertyActionDescriptor
The DippableMethodActionDescriptor instances for the dippable bean properties.
 o throwVetoException
The ThrowVetoException property
 o vcListeners
The VetoableChangeSupport instances for the dippable bean properties.
 o veListeners
The VetoableEventSupport instances for the dippable bean events.
 o vetosToOutputWriter
Flag indicating all method, property, and event vetoes should be logged to the outputStream property.
 o vmListeners
The VetoableMethodSupport instances for the dippable bean methods.

Constructor Index

 o DippableSupportImp(Object, String, String[][])
Constructs a DippableSupportImp.

Method Index

 o addDip(Dip)
Adds a dip to this bean.
 o addEventFireListener(DipEventFireListener[])
Adds a DipEventFireListener instance to the list of listeners.
 o additionalCustomizerLabels()
Gets the type names for the Customizer labels for all dips.
 o additionalCustomizers()
Gets the customizer for all dips applied to the bean.
 o addMethodCallListener(DipMethodCallListener[])
Adds a DipMethodCallListener instance to the list of listeners.
 o addPropertyChangeListener(DipPropertyChangeListener[])
Adds a DipPropertyChangeListener instance to the list of listeners.
 o addVetoableChangeListener(DipVetoableChangeListener[])
Adds a DipVetoableChangeListener instance to the list of listeners.
 o addVetoableEventListener(DipVetoableEventListener[])
Adds a DipVetoableEventListener instance to the list of listeners.
 o addVetoableMethodListener(DipVetoableMethodListener[])
Adds a DipVetoableMethodListener instance to the list of listeners.
 o correctForAggregateReturningThis(Object, Class, Object)
Corrects for the case when the aggregate returns this.
 o correctForAggregateReturningThis(Object[], Class, Object)
Corrects for the case when the aggregate returns this.
 o dippedIn(String)
Determines whether the dip is applied to this bean.
 o dips()
Gets an array of the type names of all the dips that were applied to this bean.
 o fireEventFire(int, String)
Reports a bound event firing to the registered listeners.
 o fireMethodCall(int, String, Object[])
Reports a bound method call to the registered listeners.
 o firePropertyChange(int, String, Object, Object)
Reports a bound property change to the registered listeners.
 o fireVetoableChange(int, String, Object, Object)
Reports a vetoable property change to the registered listeners.
 o fireVetoableEvent(int, String)
Reports a vetoable event notification call to the registered listeners.
 o fireVetoableMethod(int, String, Object[])
Reports a vetoable method call to the registered listeners.
 o getDipInfo(String)
Gets information about a dip applied to the dippable class.
 o getMethodNames()
Returns the array of method names in this bean.
 o getOutputStream()
Returns the OutputStream property.
 o getThrowVetoException()
Returns the throwVetoException property.
 o hasBoundEventListeners(int)
Determines whether there are any bound listeners for this event-related method.
 o hasBoundMethodListeners(int)
Determines whether there are any bound listeners for this general method.
 o hasBoundPropertyListeners(int)
Determines whether there are any bound listeners for this property-related method.
 o hasConstrainedEventListeners(int)
Determines whether there are any constrained listeners for this event-related method.
 o hasConstrainedMethodListeners(int)
Determines whether there are any constrained listeners for this general method.
 o hasConstrainedPropertyListeners(int)
Determines whether there are any constrained listeners for this property-related method.
 o needsMethodArguments(int)
Determines whether any bound or constrained listener needs a copy of the input arguments to this general method.
 o origCustomizer()
Gets the customizer for the original, non-dippable bean.
 o removeDip(String)
Removes a dip from this bean.
 o removeEventFireListener(DipEventFireListener[])
Removes a DipEventFireListener instance from the list of listeners.
 o removeEventFireListener(String)
Removes a DipEventFireListener instance from the list of listeners.
 o removeMethodCallListener(DipMethodCallListener[])
Removes a DipMethodCallListener instance from the list of listeners.
 o removeMethodCallListener(String)
Removes a DipMethodCallListener instance from the list of listeners.
 o removePropertyChangeListener(DipPropertyChangeListener[])
Removes a DipPropertyChangeListener instance from the list of listeners.
 o removePropertyChangeListener(String)
Removes a DipPropertyChangeListener instance from the list of listeners.
 o removeVetoableChangeListener(DipVetoableChangeListener[])
Removes a DipVetoableChangeListener instance from the list of listeners.
 o removeVetoableChangeListener(String)
Removes a DipVetoableChangeListener instance from the list of listeners.
 o removeVetoableEventListener(DipVetoableEventListener[])
Removes a DipVetoableEventListener instance from the list of listeners.
 o removeVetoableEventListener(String)
Removes a DipVetoableEventListener instance from the list of listeners.
 o removeVetoableMethodListener(DipVetoableMethodListener[])
Removes a DipVetoableMethodListener instance from the list of listeners.
 o removeVetoableMethodListener(String)
Removes a DipVetoableMethodListener instance from the list of listeners.
 o setOutputStream(OutputStream)
Sets the OutputStream property.
 o setThrowVetoException(boolean)
Sets the throwVetoException property.
 o writeDippableImp(OutputStream, boolean)
Adds the Dippable methods to the dippable bean being generated by the DippableGenerator class.

Variables

 o dips
 protected Collection dips
The Collection of dips applied to the dippable bean.

 o propertyActionDescriptor
 protected transient DippableMethodActionDescriptor propertyActionDescriptor[]
The DippableMethodActionDescriptor instances for the dippable bean properties.

 o methodActionDescriptor
 protected transient DippableMethodActionDescriptor methodActionDescriptor[]
The DippableMethodActionDescriptor instances for the dippable bean methods.

 o eventActionDescriptor
 protected transient DippableMethodActionDescriptor eventActionDescriptor[]
The DippableMethodActionDescriptor instances for the dippable bean events.

 o pcListeners
 protected transient PropertyChangeSupport pcListeners[]
The PropertyChangeSupport instances for the dippable bean properties.

 o vcListeners
 protected transient VetoableChangeSupport vcListeners[]
The VetoableChangeSupport instances for the dippable bean properties.

 o mcListeners
 protected transient MethodCallSupport mcListeners[]
The MethodCallSupport instances for the dippable bean methods.

 o vmListeners
 protected transient VetoableMethodSupport vmListeners[]
The VetoableMethodSupport instances for the dippable bean methods.

 o efListeners
 protected transient EventFireSupport efListeners[]
The EventFireSupport instances for the dippable bean events.

 o veListeners
 protected transient VetoableEventSupport veListeners[]
The VetoableEventSupport instances for the dippable bean events.

 o throwVetoException
 protected boolean throwVetoException
The ThrowVetoException property

See Also:
setThrowVetoException, getThrowVetoException
 o vetosToOutputWriter
 protected transient boolean vetosToOutputWriter
Flag indicating all method, property, and event vetoes should be logged to the outputStream property.

 o outputStream
 protected transient OutputStream outputStream
The OutputStream property

See Also:
setOutputStream, getOutputStream
 o outputWriter
 protected transient PrintWriter outputWriter
The writer used to write to the outputStream property.

Constructors

 o DippableSupportImp
 public DippableSupportImp(Object sourceBean,
                           String originalbeanName,
                           String arrayOfMethodNames[][])
Constructs a DippableSupportImp.

Parameters:
obj - A reference to the dippable bean.
originalbeanName - The name of the original bean.
arrayOfMethodName -
A two-dimensional array of method names. The first dimension corresponds to the different types of methods: property, event, or general. The second dimension corresponds to the methods from the dippable bean.

Methods

 o hasConstrainedPropertyListeners
 public final 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.
 o hasBoundPropertyListeners
 public final 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.
 o firePropertyChange
 public void firePropertyChange(int index,
                                String propertyName,
                                Object oldValue,
                                Object newValue)
Reports a bound property change to the registered listeners.

Parameters:
index -
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.
 o fireVetoableChange
 public void fireVetoableChange(int index,
                                String propertyName,
                                Object oldValue,
                                Object newValue) throws PropertyVetoException
Reports a vetoable property change to the registered listeners.

Parameters:
index -
An index indicating which property method in the dippable bean is reporting a vetoable property update.
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 listener wants the property change to be canceled.
 o hasConstrainedMethodListeners
 public final 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.
 o hasBoundMethodListeners
 public final 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.
 o needsMethodArguments
 public final 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.
 o fireMethodCall
 public void fireMethodCall(int index,
                            String methodID,
                            Object args[])
Reports a bound method call to the registered listeners.

Parameters:
index -
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 arguments for the method.
 o fireVetoableMethod
 public void fireVetoableMethod(int index,
                                String methodID,
                                Object args[]) throws MethodVetoException
Reports a vetoable method call to the registered listeners.

Parameters:
index -
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 arguments passed to the method that was called.
Throws: MethodVetoException
Thrown if the listener wants the method call to be canceled.
 o correctForAggregateReturningThis
 public 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.
 o correctForAggregateReturningThis
 public 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.
 o hasConstrainedEventListeners
 public final 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.
 o hasBoundEventListeners
 public final 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.
 o fireEventFire
 public void fireEventFire(int index,
                           String eventSetName)
Reports a bound event firing to the registered listeners.

Parameters:
index -
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.
 o fireVetoableEvent
 public void fireVetoableEvent(int index,
                               String eventSetName) throws EventVetoException
Reports a vetoable event notification call to the registered listeners.

Parameters:
index -
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 listener wants the event firing to be canceled.
 o dips
 public synchronized String[] dips()
Gets an array of the type names of all the dips that were applied to this bean.

Returns:
An array of dip type names.
 o addDip
 public synchronized boolean addDip(Dip newDip)
Adds a dip to this bean.

Parameters:
newDip - The dip to be added to the bean.
Returns:
true if the dip was added; false otherwise.
 o removeDip
 public synchronized boolean removeDip(String dipTypeName)
Removes a dip from this bean. This method removes the first dip it finds that has been applied to the bean with the type name that matches dipTypeName.

Parameters:
dipTypeName - The type name of the dip to be removed.
Returns:
true if the dip was removed; false otherwise.
 o dippedIn
 public synchronized boolean dippedIn(String dipTypeName)
Determines whether the dip is applied to this bean.

Parameters:
dipTypeName - The type name of the dip.
Returns:
true if the dip is applied to this bean; false otherwise.
 o getDipInfo
 public synchronized DipInfo getDipInfo(String dipTypeName)
Gets information about a dip applied to the dippable class.

Parameters:
dipTypeName - The type name of the dip.
Returns:
null if no dip corresponding to the dipTypeName has been applied to the dippable class; otherwise this method returns a DipInfo object describing the dip.
 o getMethodNames
 public String[][] getMethodNames()
Returns the array of method names in this bean. The first dimension corresponds to the different types of methods: property, event, or general. The second dimension corresponds to the methods from the dippable bean.

Returns:
A two-dimensional array of method names.
 o setOutputStream
 public void setOutputStream(OutputStream os)
Sets the OutputStream property. This property is used by the dippable class when a method is vetoed. If the OutputStream property is set, then the stack track indicating who vetoed the method call is printed to this OutputStream property.

Parameters:
os - The new setting of the OutputStream property.
 o getOutputStream
 public OutputStream getOutputStream()
Returns the OutputStream property. This property is used by the dippable class when a method is vetoed. If the OutputStream property is set, then the stack track indicating who vetoed the method call is printed to this OutputStream property.

Returns:
s The OutputStream property.
 o setThrowVetoException
 public void setThrowVetoException(boolean tve)
Sets the throwVetoException property. This property is used by the dippable class when a method is vetoed. If the throwVetoException flag is set, then a com.ibm.beans.dip.VetoRuntimeException is thrown.

Parameters:
tve - true means exception should be thrown; false means exception should NOT be thrown.
 o getThrowVetoException
 public boolean getThrowVetoException()
Returns the throwVetoException property. This property is used by the dippable class when a method is vetoed. If the throwVetoException flag is set, then a com.ibm.beans.dip.VetoRuntimeException is thrown.

Returns:
true if exception should be thrown; false otherwise.
 o origCustomizer
 public Customizer origCustomizer()
Gets the customizer for the original, non-dippable bean.

Returns:
The non-dippable bean Customizer.
 o additionalCustomizers
 public Customizer[] additionalCustomizers()
Gets the customizer for all dips applied to the bean.

Returns:
An array of Customizers for each of the dips.
 o additionalCustomizerLabels
 public String[] additionalCustomizerLabels()
Gets the type names for the Customizer labels for all dips.

Returns:
An array of dip type names.
 o writeDippableImp
 public static final void writeDippableImp(OutputStream s,
                                           boolean originalClassImplementsDippable) throws IOException
Adds the Dippable methods to the dippable bean being generated by the DippableGenerator class.

Parameters:
s - The OutputStream instance used by this method.
originalClassImplementsDippable - true means the class being morphed implemented the Dippable interface; false otherwise.
 o addPropertyChangeListener
 protected synchronized void addPropertyChangeListener(DipPropertyChangeListener listener[])
Adds a DipPropertyChangeListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o addVetoableChangeListener
 protected synchronized void addVetoableChangeListener(DipVetoableChangeListener listener[])
Adds a DipVetoableChangeListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o addMethodCallListener
 protected synchronized void addMethodCallListener(DipMethodCallListener listener[])
Adds a DipMethodCallListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o addVetoableMethodListener
 protected synchronized void addVetoableMethodListener(DipVetoableMethodListener listener[])
Adds a DipVetoableMethodListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o addEventFireListener
 protected synchronized void addEventFireListener(DipEventFireListener listener[])
Adds a DipEventFireListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o addVetoableEventListener
 protected synchronized void addVetoableEventListener(DipVetoableEventListener listener[])
Adds a DipVetoableEventListener instance to the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removePropertyChangeListener
 protected synchronized void removePropertyChangeListener(String dipTypeName)
Removes a DipPropertyChangeListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removePropertyChangeListener
 protected synchronized void removePropertyChangeListener(DipPropertyChangeListener listener[])
Removes a DipPropertyChangeListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removeVetoableChangeListener
 protected synchronized void removeVetoableChangeListener(String dipTypeName)
Removes a DipVetoableChangeListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removeVetoableChangeListener
 protected synchronized void removeVetoableChangeListener(DipVetoableChangeListener listener[])
Removes a DipVetoableChangeListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removeMethodCallListener
 protected synchronized void removeMethodCallListener(String dipTypeName)
Removes a DipMethodCallListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removeMethodCallListener
 protected synchronized void removeMethodCallListener(DipMethodCallListener listener[])
Removes a DipMethodCallListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removeVetoableMethodListener
 protected synchronized void removeVetoableMethodListener(String dipTypeName)
Removes a DipVetoableMethodListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removeVetoableMethodListener
 protected synchronized void removeVetoableMethodListener(DipVetoableMethodListener listener[])
Removes a DipVetoableMethodListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removeEventFireListener
 protected synchronized void removeEventFireListener(String dipTypeName)
Removes a DipEventFireListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removeEventFireListener
 protected synchronized void removeEventFireListener(DipEventFireListener listener[])
Removes a DipEventFireListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.
 o removeVetoableEventListener
 protected synchronized void removeVetoableEventListener(String dipTypeName)
Removes a DipVetoableEventListener instance from the list of listeners.

Parameters:
dipTypeName - The type name of the dip to be removed.
 o removeVetoableEventListener
 protected synchronized void removeVetoableEventListener(DipVetoableEventListener listener[])
Removes a DipVetoableEventListener instance from the list of listeners.

Parameters:
listener - An array of potential listeners for the dippable bean.

All Packages  Class Hierarchy  This Package  Previous  Next  Index