File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes callback methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "callback methods" Watch "callback methods" New topic
Author

callback methods

rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
What are callback methods?

Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
A callback provides an asynchronous way of doing something.
If you have a thing that needs to be done, and you don't want the application to sit around waiting for it to be done, then you assign the job to some other class, and when that class has done the request, it sends a callback to you.
For instance, when you create a listener, you are assigning it the job of listening for events. Then you go on and do other stuff. When an event happens, the listener makes a callback to you saying "An event happened", now it is your job to handle the event in your callback method.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: callback methods
 
Similar Threads
Ajax callback methds
callback implementation
Callback methods
Container callback and inline methods
callback and lifecycle methods