• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

HFSJ Page 262

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone please explain the Usually implemented column on this page for all the scenario. Iam probably missing something and getting Confused.

1) Why is HttpSessionListener an Attribute Class?

2) Is not the HttpSessionActivationListener implemented by Attribute Class?

3) Is not HttpSessionBindingListener is implemented by Attribute Class?

4) HttpSessionAttributeListener is implemented by Attribute Class.

Thanks in advance for your Help.

Regards,
Vinod S
 
Ranch Hand
Posts: 242
Mac Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinod,

You seem to have taken all these things in the other way round.

Actaully except HttpSessionBindingListener and HttpSessionActivationListener, every other listeners are usually implimented by any other(non attribute) classes not the attribute class.

Please give stress on the word usually.
Means it's not imperative.

See HttpSessionBindingListener and HttpSessionActivationListener, these two listeners have to do all the stuff with the attributes, as events trigger these Listeners only when something happens with attributes. So there is no significance in making a non-attribute class to extend these interfaces.

But for other listeners, you can have any class (attribute or non-attribute) implementing them because they are not attribute specific. But you have to provide proper implementation for all the methods defined in these interfaces.

Regards,
Khushhal
 
Can't .... do .... plaid .... So I did this tiny ad instead:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic