Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are callback and inline methods.

 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have come across the terms callback and inline in Filters chapter. Just wanted to know the definitions of each.

Whether the following methods are callback or not?
doGet,doPost,init and destroy(both in Filters and jsps/servlets), doFilter


Any examples of inline methods?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Callback methods are methods which will be called by the container (you don't call them). Like doPost, doGet of a servlet. Inline methods, although I do not like that term, are all other methods.
 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So should I say that Filter's doFilter method is a callback method but FilterChain's doFilter method is an inline?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Filter's doFilter method is called by the container, but it's your role to call the FilterChain's doFilter method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic