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.
-
dips
- The Collection of dips applied to the dippable bean.
-
efListeners
- The EventFireSupport instances for the dippable bean events.
-
eventActionDescriptor
- The DippableMethodActionDescriptor instances for the dippable bean events.
-
mcListeners
- The MethodCallSupport instances for the dippable bean methods.
-
methodActionDescriptor
- The DippableMethodActionDescriptor instances for the dippable bean methods.
-
outputStream
- The OutputStream property
-
outputWriter
- The writer used to write to the outputStream property.
-
pcListeners
- The PropertyChangeSupport instances for the dippable bean properties.
-
propertyActionDescriptor
- The DippableMethodActionDescriptor instances for the dippable bean properties.
-
throwVetoException
- The ThrowVetoException property
-
vcListeners
- The VetoableChangeSupport instances for the dippable bean properties.
-
veListeners
- The VetoableEventSupport instances for the dippable bean events.
-
vetosToOutputWriter
- Flag indicating all method, property, and event vetoes should be
logged to the outputStream property.
-
vmListeners
- The VetoableMethodSupport instances for the dippable bean methods.
-
DippableSupportImp(Object, String, String[][])
- Constructs a DippableSupportImp.
-
addDip(Dip)
- Adds a dip to this bean.
-
addEventFireListener(DipEventFireListener[])
- Adds a DipEventFireListener instance to the list of listeners.
-
additionalCustomizerLabels()
- Gets the type names for the Customizer labels for all dips.
-
additionalCustomizers()
- Gets the customizer for all dips applied to the bean.
-
addMethodCallListener(DipMethodCallListener[])
- Adds a DipMethodCallListener instance to the list of listeners.
-
addPropertyChangeListener(DipPropertyChangeListener[])
- Adds a DipPropertyChangeListener instance to the list of listeners.
-
addVetoableChangeListener(DipVetoableChangeListener[])
- Adds a DipVetoableChangeListener instance to the list of listeners.
-
addVetoableEventListener(DipVetoableEventListener[])
- Adds a DipVetoableEventListener instance to the list of listeners.
-
addVetoableMethodListener(DipVetoableMethodListener[])
- Adds a DipVetoableMethodListener instance to the list of listeners.
-
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
.
-
dippedIn(String)
- Determines whether the dip is applied to this bean.
-
dips()
- Gets an array of the type names of all the dips that were
applied to this bean.
-
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 notification call to the registered listeners.
-
fireVetoableMethod(int, String, Object[])
- Reports a vetoable method call to the registered listeners.
-
getDipInfo(String)
- Gets information about a dip applied to the dippable class.
-
getMethodNames()
- Returns the array of method names in this bean.
-
getOutputStream()
- Returns the OutputStream property.
-
getThrowVetoException()
- Returns the throwVetoException property.
-
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.
-
origCustomizer()
- Gets the customizer for the original, non-dippable bean.
-
removeDip(String)
- Removes a dip from this bean.
-
removeEventFireListener(DipEventFireListener[])
- Removes a DipEventFireListener instance from the list of listeners.
-
removeEventFireListener(String)
- Removes a DipEventFireListener instance from the list of listeners.
-
removeMethodCallListener(DipMethodCallListener[])
- Removes a DipMethodCallListener instance from the list of listeners.
-
removeMethodCallListener(String)
- Removes a DipMethodCallListener instance from the list of listeners.
-
removePropertyChangeListener(DipPropertyChangeListener[])
- Removes a DipPropertyChangeListener instance from the list of listeners.
-
removePropertyChangeListener(String)
- Removes a DipPropertyChangeListener instance from the list of listeners.
-
removeVetoableChangeListener(DipVetoableChangeListener[])
- Removes a DipVetoableChangeListener instance from the list of listeners.
-
removeVetoableChangeListener(String)
- Removes a DipVetoableChangeListener instance from the list of listeners.
-
removeVetoableEventListener(DipVetoableEventListener[])
- Removes a DipVetoableEventListener instance from the list of listeners.
-
removeVetoableEventListener(String)
- Removes a DipVetoableEventListener instance from the list of listeners.
-
removeVetoableMethodListener(DipVetoableMethodListener[])
- Removes a DipVetoableMethodListener instance from the list of listeners.
-
removeVetoableMethodListener(String)
- Removes a DipVetoableMethodListener instance from the list of listeners.
-
setOutputStream(OutputStream)
- Sets the OutputStream property.
-
setThrowVetoException(boolean)
- Sets the throwVetoException property.
-
writeDippableImp(OutputStream, boolean)
- Adds the Dippable methods
to the dippable bean being generated
by the DippableGenerator class.
dips
protected Collection dips
- The Collection of dips applied to the dippable bean.
propertyActionDescriptor
protected transient DippableMethodActionDescriptor propertyActionDescriptor[]
- The DippableMethodActionDescriptor instances for the dippable bean properties.
methodActionDescriptor
protected transient DippableMethodActionDescriptor methodActionDescriptor[]
- The DippableMethodActionDescriptor instances for the dippable bean methods.
eventActionDescriptor
protected transient DippableMethodActionDescriptor eventActionDescriptor[]
- The DippableMethodActionDescriptor instances for the dippable bean events.
pcListeners
protected transient PropertyChangeSupport pcListeners[]
- The PropertyChangeSupport instances for the dippable bean properties.
vcListeners
protected transient VetoableChangeSupport vcListeners[]
- The VetoableChangeSupport instances for the dippable bean properties.
mcListeners
protected transient MethodCallSupport mcListeners[]
- The MethodCallSupport instances for the dippable bean methods.
vmListeners
protected transient VetoableMethodSupport vmListeners[]
- The VetoableMethodSupport instances for the dippable bean methods.
efListeners
protected transient EventFireSupport efListeners[]
- The EventFireSupport instances for the dippable bean events.
veListeners
protected transient VetoableEventSupport veListeners[]
- The VetoableEventSupport instances for the dippable bean events.
throwVetoException
protected boolean throwVetoException
- The ThrowVetoException property
- See Also:
- setThrowVetoException, getThrowVetoException
vetosToOutputWriter
protected transient boolean vetosToOutputWriter
- Flag indicating all method, property, and event vetoes should be
logged to the outputStream property.
outputStream
protected transient OutputStream outputStream
- The OutputStream property
- See Also:
- setOutputStream, getOutputStream
outputWriter
protected transient PrintWriter outputWriter
- The writer used to write to the outputStream property.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
origCustomizer
public Customizer origCustomizer()
- Gets the customizer for the original, non-dippable bean.
- Returns:
- The non-dippable bean Customizer.
additionalCustomizers
public Customizer[] additionalCustomizers()
- Gets the customizer for all dips applied to the bean.
- Returns:
- An array of Customizers for each of the dips.
additionalCustomizerLabels
public String[] additionalCustomizerLabels()
- Gets the type names for the Customizer labels for all dips.
- Returns:
- An array of dip type names.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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