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.
-
eventFireListeners
- An array of event listeners initialized by the
createEventFireListener() method.
-
methodCallListeners
- An array of method call listeners initialized by the
createMethodCallListener() method.
-
propertyChangeListeners
- An array of property change listeners initialized by the
createPropertyChangeListener() method.
-
vetoableChangeListeners
- An array of vetoable property change listeners initialized by the
createVetoableChangeListener() method.
-
vetoableEventListeners
- An array of vetoable event listeners initialized by the
createVetoableEventListener() method.
-
vetoableMethodListeners
- An array of vetoable method call listeners initialized by the
createVetoableMethodListener() method.
-
SimpleDip()
-
-
createEventFireListener(Object, String[])
- Indicates that this SimpleDip instance does not want to be bound to any
dippable bean event.
-
createImplementation(Object)
- Indicates that this SimpleDip instance has no other implementation than
itself.
-
createMethodCallListener(Object, String[])
- Indicates that this SimpleDip instance does not want to be bound to any
dippable bean method.
-
createPropertyChangeListener(Object, String[])
- Indicates that this SimpleDip instance does not want to be bound to
any dippable bean property.
-
createVetoableChangeListener(Object, String[])
- Indicates that this SimpleDip instance does not want to constrain any
dippable bean property.
-
createVetoableEventListener(Object, String[])
- Indicates that this SimpleDip instance does not want to constrain any
dippable bean event.
-
createVetoableMethodListener(Object, String[])
- Indicates that this SimpleDip instance does not want to constrain any
dippable bean method.
-
includeInMorphedClass(String)
- Indicates that this SimpleDip implementation will allow all methods
to be overridden in a dippable class.
-
isRemovable()
- Indicates the SimpleDip instance can be removed from a dippable bean.
-
priority()
- Gets the default priority for a dip.
-
releaseImplementation()
- Indicates that this SimpleDip instance has nothing that needs to be
released when the dip is removed from the bean.
-
retrieveDip()
- Retrieves a pointer to the SimpleDip instance.
-
typeName()
- Gets the type name for the dip.
-
worksWith(String)
- Indicates the SimpleDip instance can work with the specified dip.
propertyChangeListeners
protected DipPropertyChangeListener propertyChangeListeners[]
- An array of property change listeners initialized by the
createPropertyChangeListener() method.
vetoableChangeListeners
protected DipVetoableChangeListener vetoableChangeListeners[]
- An array of vetoable property change listeners initialized by the
createVetoableChangeListener() method.
methodCallListeners
protected DipMethodCallListener methodCallListeners[]
- An array of method call listeners initialized by the
createMethodCallListener() method.
vetoableMethodListeners
protected DipVetoableMethodListener vetoableMethodListeners[]
- An array of vetoable method call listeners initialized by the
createVetoableMethodListener() method.
eventFireListeners
protected DipEventFireListener eventFireListeners[]
- An array of event listeners initialized by the
createEventFireListener() method.
vetoableEventListeners
protected DipVetoableEventListener vetoableEventListeners[]
- An array of vetoable event listeners initialized by the
createVetoableEventListener() method.
SimpleDip
public SimpleDip()
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
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
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
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
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
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
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
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
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
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
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
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
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
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