NAME

Servlet::Http::HttpSessionBindingEvent - session binding event class


SYNOPSIS

  my $event =
      Servlet::Http::HttpSessionEvent->new($session, $attribute, $value);
  my $name = $event->getName();
  my $value = $event->getValue();
  my $session = $event->getSession();
  # or
  my $session = $event->getSource();


DESCRIPTION

This class represents event notifications for changes to session attributes. The event is either sent to an object that implements Servlet::Http::HttpSessionBindingListener when it is bound or unbound from a session, or to a Servlet::Http::HttpSessionAttributesListener that has been configured in the deployment descriptor when any attribute is bound, unbound or replaced in a session.


CONSTRUCTOR

new($session, $name, [$value])
Constructs an event that notifies an object that it has been bound to or unbound from a session. To receive the event, the object must implement Servlet::Http::HttpSessionBindingListener.

Parameters:

$session
the Servlet::Http::HttpSession instance to which the object is bound or unbound

$name
the name with which the object is bound or unbound

$object
the scalar or reference that is bound or unbound


METHODS

getName()
Returns the name with which the object is bound to or unbound from the session.

getSession()
Returns the Servlet::Http::HttpSession that is the source of this event.

getSource()
Returns the Servlet::Http::HttpSession that is the source of this event.

getValue()
Returns the value of the attribute being added, removed or replaced. If the attribute was added (or bound), this is the value of the attribute. If the attribute was removed (or unbound), this is the value of the removed attribute. If the attribute was replaced, this is the old value of the attribute.


SEE ALSO

the Servlet::Http::HttpSession manpage, the Servlet::Http::HttpSessionEvent manpage, the Servlet::Http::HttpSessionAttributesListener manpage, the Servlet::Http::HttpSessionBindingListener manpage


AUTHOR

Brian Moseley, bcm@maz.org