File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Interfaces" Watch "Interfaces" New topic
Author

Interfaces

Smitha Prasad
Ranch Hand

Joined: Apr 02, 2002
Posts: 41
what is call back function?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello Smitha,
I did a quick search on the Java in General (beginner) forum for "call back" in the subject (any date). Three promising looking explanations resulted:
callback methods - 2001.05.16
java callback - 2001.09.27
CallBack functions... - 2002.03.25
Note: The search page link is at the top right of this page and a lot of useful information can be found with it.
Good Luck.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Smitha Prasad
Ranch Hand

Joined: Apr 02, 2002
Posts: 41
thanks!
Kaustubh Patil
Ranch Hand

Joined: Aug 13, 2001
Posts: 164
Whenever you delegate a certain responsibility to the language or the s/w before commiting anything ,sometimes, it calls a function ( user defiened ). it is here that the user gets the chance to do some clean up activities..
These are called as call-back functions..
I can give u some examples..
One can think of finalize() as a call-back function..
Before the JVM takes the object for garbage collection it calls the finalize method of that object, in which the user can write some clean up activities...in a way the control is passed from the JVM "back" to the user obj.
another example i can think of is from the entity beans of EJB framework. In container managed persistant entity beans all the database commit's and rollback are handles by the EJB container. But before any commit or rollback is fired methods are called in the users EJB where the user has the chance to do any activites before the database commits or rollbacks.
Hope this is of some help.
Kaustubh.


Kaustubh. Mumbai, India.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Interfaces