All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.dip.SimpleDip

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

public abstract class SimpleDip
extends Object
implements Dip, DipListenerAuxiliary
This abstract support class easily allows people to provide Dip classes.

The SimpleDip class defaults to providing a generic dip with normal priority, that works with all other dips, that can be applied anywhere, that can be removed at any time, and that does not intercept any bean properties, methods, or events.

Beans extending this class will need to implement the typeName() method.


Variable Index

 o eventFireListeners
An array of event listeners initialized by the createEventFireListener() method.
 o methodCallListeners
An array of method call listeners initialized by the createMethodCallListener() method.
 o propertyChangeListeners
An array of property change listeners initialized by the createPropertyChangeListener() method.
 o vetoableChangeListeners
An array of vetoable property change listeners initialized by the createVetoableChangeListener() method.
 o vetoableEventListeners
An array of vetoable event listeners initialized by the createVetoableEventListener() method.
 o vetoableMethodListeners
An array of vetoable method call listeners initialized by the createVetoableMethodListener() method.

Constructor Index

 o SimpleDip()

Method Index

 o createEventFireListener(Object, String[])
Indicates that this SimpleDip instance does not want to be bound to any dippable bean event.
 o createImplementation(Object)
Indicates that this SimpleDip instance has no other implementation than itself.
 o createMethodCallListener(Object, String[])
Indicates that this SimpleDip instance does not want to be bound to any dippable bean method.
 o createPropertyChangeListener(Object, String[])
Indicates that this SimpleDip instance does not want to be bound to any dippable bean property.
 o createVetoableChangeListener(Object, String[])
Indicates that this SimpleDip instance does not want to constrain any dippable bean property.
 o createVetoableEventListener(Object, String[])
Indicates that this SimpleDip instance does not want to constrain any dippable bean event.
 o createVetoableMethodListener(Object, String[])
Indicates that this SimpleDip instance does not want to constrain any dippable bean method.
 o includeInMorphedClass(String)
Indicates that this SimpleDip implementation will allow all methods to be overridden in a dippable class.
 o isRemovable()
Indicates the SimpleDip instance can be removed from a dippable bean.
 o priority()
Gets the default priority for a dip.
 o releaseImplementation()
Indicates that this SimpleDip instance has nothing that needs to be released when the dip is removed from the bean.
 o retrieveDip()
Retrieves a pointer to the SimpleDip instance.
 o typeName()
Gets the type name for the dip.
 o worksWith(String)
Indicates the SimpleDip instance can work with the specified dip.

Variables

 o propertyChangeListeners
 protected DipPropertyChangeListener propertyChangeListeners[]
An array of property change listeners initialized by the createPropertyChangeListener() method.

 o vetoableChangeListeners
 protected DipVetoableChangeListener vetoableChangeListeners[]
An array of vetoable property change listeners initialized by the createVetoableChangeListener() method.

 o methodCallListeners
 protected DipMethodCallListener methodCallListeners[]
An array of method call listeners initialized by the createMethodCallListener() method.

 o vetoableMethodListeners
 protected DipVetoableMethodListener vetoableMethodListeners[]
An array of vetoable method call listeners initialized by the createVetoableMethodListener() method.

 o eventFireListeners
 protected DipEventFireListener eventFireListeners[]
An array of event listeners initialized by the createEventFireListener() method.

 o vetoableEventListeners
 protected DipVetoableEventListener vetoableEventListeners[]
An array of vetoable event listeners initialized by the createVetoableEventListener() method.

Constructors

 o SimpleDip
 public SimpleDip()

Methods

 o priority
 public int priority()
Gets the default priority for a dip. The recommended default value is 500. Derived classes must override this method if they want to have some other priority.

Returns:
The default priority of 500.
See Also:
priority
 o typeName
 public abstract String typeName()
Gets the type name for the dip. Derived classes must override this method.

Returns:
The string type name.
See Also:
typeName
 o worksWith
 public boolean worksWith(String dipType)
Indicates the SimpleDip instance can work with the specified dip. Derived classes must override this method if they do not want to work with another dip.

Parameters:
dipType - Dip type requesting addition to the bean.
Returns:
Always true. This means a SimpleDip implementation can work with all other dips.
See Also:
worksWith
 o isRemovable
 public boolean isRemovable()
Indicates the SimpleDip instance can be removed from a dippable bean. Derived classes must override this method if they do not want to be removed from a dippable bean.

Returns:
Always true. This means a SimpleDip implementation is removable.
See Also:
isRemovable
 o createImplementation
 public Object createImplementation(Object obj) throws DipRejectAdditionException
Indicates that this SimpleDip instance has no other implementation than itself. In addition, this dip can be dipped onto anything. It never throws a DipRejectAdditionException object though someone deriving from the SimpleDip class could. Derived classes must override this method if they want to provide a separate implementation or reject being added to a bean.

Parameters:
obj - Object to which the dip was added.
Returns:
Always null. This means a SimpleDip implementation requires no separate implementation.
Throws: DipRejectAdditionException
Never thrown, but a derived class could.
See Also:
createImplementation
 o releaseImplementation
 public void releaseImplementation()
Indicates that this SimpleDip instance has nothing that needs to be released when the dip is removed from the bean. Derived classes must override this method if they want to release a resource or do any cleanup before being removed from the bean.

See Also:
releaseImplementation
 o includeInMorphedClass
 public boolean includeInMorphedClass(String methodName)
Indicates that this SimpleDip implementation will allow all methods to be overridden in a dippable class. Derived classes must override this method if they want to limit the number of methods overridden in a dippable class.

Parameters:
methodName - The name of the method to be considered for including in a dippable class.
Returns:
Always true. This means a SimpleDip implementation says all the methods in a dippable class should be overridden.
See Also:
includeInMorphedClass
 o createPropertyChangeListener
 public DipPropertyChangeListener[] createPropertyChangeListener(Object imp,
                                                                 String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to be bound to any dippable bean property. Derived classes must override this method if they want to be bound to any dippable bean property. Derived classes which override this method must ensure that the propertyChangeListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createPropertyChangeListener
 o createVetoableChangeListener
 public DipVetoableChangeListener[] createVetoableChangeListener(Object imp,
                                                                 String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to constrain any dippable bean property. Derived classes must override this method if they want to constrain any dippable bean property. Derived classes which override this method must ensure that the vetoableChangeListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createVetoableChangeListener
 o createMethodCallListener
 public DipMethodCallListener[] createMethodCallListener(Object imp,
                                                         String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to be bound to any dippable bean method. Derived classes must override this method if they want to be bound to any dippable bean method. Derived classes which override this method must ensure that the methodCallListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createMethodCallListener
 o createVetoableMethodListener
 public DipVetoableMethodListener[] createVetoableMethodListener(Object imp,
                                                                 String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to constrain any dippable bean method. Derived classes must override this method if they want to constrain any dippable bean method. Derived classes which override this method must ensure that the vetoableMethodListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createVetoableMethodListener
 o createEventFireListener
 public DipEventFireListener[] createEventFireListener(Object imp,
                                                       String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to be bound to any dippable bean event. Derived classes must override this method if they want to be bound to any dippable bean event. Derived classes which override this method must ensure that the eventFireListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createEventFireListener
 o createVetoableEventListener
 public DipVetoableEventListener[] createVetoableEventListener(Object imp,
                                                               String methods[]) throws DipRejectAdditionException
Indicates that this SimpleDip instance does not want to constrain any dippable bean event. Derived classes must override this method if they want to constrain any dippable bean event. Derived classes which override this method must ensure that the vetoableEventListeners array is properly allocated and initialized if they plan to use it as the return value.

Parameters:
imp - This is the implementation returned from the createImplementation() method.
methods - An array of method prototypes for the bean.
Returns:
An array of null listeners
Throws: DipRejectAdditionException
Never throws this, though a derived class could.
See Also:
createVetoableEventListener
 o retrieveDip
 public Dip retrieveDip()
Retrieves a pointer to the SimpleDip instance. Derived classes could implement their Dip<ListenerType>Listener interfaces as internal methods in the dip. Whether or not the Dip<ListenerType>Listeners are implemented in separate classes, or as part of the dip, is totally up to the dip designer. Either appoach is acceptable to the Dipping Framework. If the dip decides to implement their Dip<ListenerType>Listener interface as part of the dip, this method is provided as a convenience.

Returns:
The dip that generated this listener.

All Packages  Class Hierarchy  This Package  Previous  Next  Index