This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
BTW: Why are you using Vector rather than ArrayList?
Joined: Jul 06, 2005
What I'm doing is sending a message to an asynchronous service. The service emits a Notification when the response arrives. So I'm passing a Vector (or other List) as the Handback object to the Notification handler and calling wait.
The Notification Listener is called when the Notification arrives. It gets the UserData from the Notification and adds it to the handback Vector, then calls vector.notify()
The caller wakes up and has the response in its vector. Apart from the compiler b!tching at me it all works fine.