Re: how OnMessage() works
Friday, October 5, 2007 08:05 PM
I think it's a "registered callback", to use generic pattern kind of terms, right?
You "register" -- you make a call that tells the queue manager, basically, to call your class's onMessage, when an appropriate message arrives. And the queue manager decides how and when to call ("callback") your class's method.
It's an example of "Inversion of Control", sort of, too, to use another generic pattern kind of term. you don't write the "control thread"; that's the queue manager's responsibility. instead, you "invert" by letting the control thread invoke your method.