All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.beans.samples.dips.sessauth.SAVetoableListener

java.lang.Object
   |
   +----com.ibm.beans.samples.dips.sessauth.SAVetoableListener

public class SAVetoableListener
extends Object
implements DipVetoableMethodListener, DipVetoableEventListener, DipVetoableChangeListener
This object implements all the vetoable listeners for the Session Authentication dip. These listeners check to see if the principal has been successfully authenticated. If the principal has been successfully authenticated, the listener returns; otherwise, it vetos the constrained property, method, or event.

See Also:
SAPrincipal, SAPrincipalQuery, SAAuthenticator

Constructor Index

 o SAVetoableListener(SAImpl)
Constructs an SAVetoableListener.

Method Index

 o handleVetoableEvent(EventFireEvent)
Handles the vetoing of events.
 o handleVetoableMethod(MethodCallEvent)
Handles vetoing of methods.
 o needsArguments()
Indicates whether the listener needs arguments.
 o recoverFromEventVeto(EventFireEvent)
Recovers from a vetoed event.
 o recoverFromMethodVeto(MethodCallEvent)
Recovers from a vetoed method.
 o retrieveDip()
Retrieves a pointer to the dip that created the listener.
 o vetoableChange(PropertyChangeEvent)
Handles vetoing of property changes and recovery from vetoed changes.

Constructors

 o SAVetoableListener
 public SAVetoableListener(SAImpl implementation)
Constructs an SAVetoableListener.

Parameters:
implementation - A reference to the Session Authentication Dip's implementation

Methods

 o handleVetoableMethod
 public void handleVetoableMethod(MethodCallEvent evt) throws MethodVetoException
Handles vetoing of methods. This method is called before the dippable bean's method is invoked.

Parameters:
evt - A MethodCallEvent object describing the event source and the method that was called.
Throws: MethodVetoException
This exception may be thrown if the VetoableMethodListener wants the method operation not to be performed.
 o recoverFromMethodVeto
 public void recoverFromMethodVeto(MethodCallEvent evt)
Recovers from a vetoed method. This method is called if the dippable bean's method was vetoed.

This method is called if the dippable bean's method was vetoed by another dip and when this dip already had its handleVetoableMethod method called and did not veto the event.

Parameters:
evt - A MethodCallEvent object describing the event source and the method that was called.
 o needsArguments
 public boolean needsArguments()
Indicates whether the listener needs arguments. By not needing arguments, performance is improved because the dipping framework does not need to do any marshaling.

Returns:
true if arguments are needed, otherwise false.
 o handleVetoableEvent
 public void handleVetoableEvent(EventFireEvent evt) throws EventVetoException
Handles the vetoing of events. This method is called before the dippable bean fires an event.

Parameters:
evt - An EventFireEvent object describing the event source and the event that was fired.
Throws: EventVetoException
This exception is thrown if the VetoableEventListener wants the event firing to be canceled.
 o recoverFromEventVeto
 public void recoverFromEventVeto(EventFireEvent evt)
Recovers from a vetoed event. This method is called if a dippable bean's event was vetoed.

This method gets called if the dippable bean's event was vetoed by another dip and when this dip already had its handleVetoableEvent method called and did not veto the event.

Parameters:
evt - A EventFireEvent object describing the event source and the event that was vetoed.
 o vetoableChange
 public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
Handles vetoing of property changes and recovery from vetoed changes. It is called before a dippable beans property changes, and if that change is vetoed by another dip.

This method is called under two conditions:

  1. Before the dippable bean's property change method is called.
  2. If the dippable bean's property change was vetoed by another dip and when this dip already had it's vetoableChange method called and did not veto the event.

Because the dipping framework is using the JavaBeans vetoable change support, it differs slightly from the vetoable methods and vetoable events.

Parameters:
evt - A PropertyChangeEvent object describing the event source and the property change.
Throws: PropertyVetoException
This exception may be thrown if the VetoableMethodListener wants the property operation not to be performed.
See Also:
VetoableChangeListener
 o retrieveDip
 public Dip retrieveDip()
Retrieves a pointer to the dip that created the listener.

Returns:
A reference to the dip that created this listener.

All Packages  Class Hierarchy  This Package  Previous  Next  Index